<template>
	<view class="map">
		<!-- 我是选择框 -->
<!-- 		<goodsBottom />
		<open_hd /> -->
		<!-- <open /> -->
		<!-- <open_gh /> -->
				<!-- 地图 -->
				<!-- <homeMap /> -->
		<!-- <cover-view v-show="isshow">444</cover-view> -->
		<!--  -->
		<!-- 底部线路选择弹层 -->
		<view v-show="isshow" class="search_down_con ">
			<view class="search_down_con_ flex align-center" style="flex-direction: column;">
				<view class="title solid-bottom padding flex justify-center align-center"
					style="width: 100%;height: 80rpx;background-color: white;">
					<text>请选择你的线路</text>
				</view>
				<view style="border-bottom: 1px solid #157EFF;" class="search_  flex justify-between align-center">
					<input style="width:100%" type="text" v-model="seach_line" placeholder="搜索" />
					<view class="seach_icon " @click="searchline">
						<text style="font-size: 40rpx;" class="cuIcon-search text-blue"></text>
					</view>
				</view>
				<view class="MainlineName margin-top-sm">
					<scroll-view scroll-y="true" class="scroll-Y margin-bottom-xl">
						<view class="solid-bottom itemDom flex align-center justify-center scroll-view-item uni-bg-blue"
							v-for="(item, index) in items" @click="toshowline(items[index])">
							<text>{{ item.linename }}</text>
						</view>
					</scroll-view>
				</view>
				<view @click="closedown" style="background-color: #157EFF;"
					class="search_down_con_close flex justify-center align-center">
					<text class="text-white">关闭</text>
				</view>
			</view>
		</view>
		<!-- 我是未采集选择类型 -->
		<view class="Notcollected" v-show="issshow_choose_type">
			<view class="chosse_type padding-sm flex align-center justify-center " style="flex-direction: column;">
				<text class="block">选择类型</text>
				<view @click="choose_type(item.pointType)"
					class="choose_type_item flex padding-sm solid-bottom  justify-between align-center"
					v-for="(item, index) in choose_type_arr" :key="item.pointType">
					<text :class="item.pointType == check_ ? 'text-blue' : ''">{{ item.name }}</text>
					<text v-show="item.pointType == check_" class="cuIcon-check "
						:class="item.pointType == check_ ? 'text-blue' : ''"></text>
				</view>
				<view style="width: 100%;height:80rpx;" class="qcan flex justify-between align-center">
					<view @click="choose_type_qd" class="queding flex justify-center align-center"
						style=" border-right: 1rpx solid #999999;width: 50%;height: 50%;">
						<text>确定</text>
					</view>
					<view @click="choose_type_canls" class="canls flex justify-center align-center"
						style="width: 50%;height: 50%;">
						<text>取消</text>
					</view>
				</view>
			</view>
		</view>
		<!-- 点位信息 -->
		<view class="icon_detail" v-if="isshowstop">
			<view class="icon_detail_Header justify-between padding-right solid-bottom flex align-center padding-left">

				<text style="color: #333333;font-size: 26rpx;">基本信息</text>
				<text v-show="form.isshow_close == true" class="cuIcon-close" @click="close_stop"
					style="font-size: 40rpx;"></text>
			</view>
			<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y_ padding-bottom-xl">
				<view class="constant">
					<view class="constant_item solid-bottom padding-bottom-sm flex align-center" style="flex-wrap: wrap;">
						<text class="block padding-sm">主体类型</text>
						<!-- <view style="flex-wrap:wrap;" class=" flex  padding-left-sm ztlx_radio margin-top-sm paddin-top-sm flex align-center">
                            <view @click="changge_ztlx(item.key)" :class="item.key == ztlx_check1 ?'check_zxg':''" class="margin-bottom-sm zxg_radio_item margin-right" style="text-align: center;"  v-for="(item,index) in ztlx_radio_arr" :key = "item.key">
                                <text>{{item.value}}</text>
                            </view>
                        </view> -->
						<view class="constant_item_type flex " style="flex-wrap: wrap;">

							<radio-group @change="radioChange" class="flex align-center" style="flex-wrap: wrap;">
								<label style="transform: scale(0.9);width: 33%;margin-bottom: 5rpx;"
									class="flex align-center  uni-list-cell uni-list-cell-pd" v-for="(item, index) in items_radio"
									:key="index">
									<view class="margin-right-sm">
										<radio :disabled="item.key !=form.pointType" :value="item.value"
											:checked="item.key ==form.pointType" />
									</view>
									<view style="color: #555555;font-size: 26rpx;">{{ item.name }}</view>
								</label>
							</radio-group>
						</view>
					</view>
					<view @click="tochangelinwId" class="constant_item padding solid-bottom">
						<text class="margin-right"
							style="font-size: 28rpx;font-family: PingFang SC;font-weight: 500;color: #333333;">主线名称:</text>
						<text v-if="form.isshow_close == true" style="font-size: 26rpx;font-family: PingFang SC;font-weight: 400;color: #555555;">{{ form.linename }}</text>
						<text v-else style="font-size: 26rpx;font-family: PingFang SC;font-weight: 400;color: #555555;">{{ line?line:items[1].linename}}</text>
					</view>
					<view class="constant_item flex padding solid-bottom" v-if="form.pointType == 6">
						<text class="margin-right margin-bottom"
							style="font-size: 28rpx;font-family: PingFang SC;font-weight: 500;color: #333333;"></text>
						<view @click="check_bx_type_(index)" style="color: #555555;"
							:class="index == form.dbxType - 1 ? 'blue_' : ''" class="istg_dy_cont_top_item_ margin-right"
							v-for="(item, index) in bx_type" :key="index">
							<text style="font-size: 24rpx;">{{ item.name }}</text>
						</view>
					</view>
					<view v-if="form.pointType == 1" class="constant_item padding solid-bottom">
						<text class="margin-right"
							style="font-size: 28rpx;font-family: PingFang SC;font-weight: 500;color: #333333;">环网站名称:</text>
						<view class="padding-top-sm">
							<input type="text" placeholder-style="font-size:26rpx;color:#adadad" placeholder="请输入相关内容"
								v-model="form.hwzName" />
						</view>
					</view>
					<view v-if="form.pointType == 3" class="constant_item padding solid-bottom">
						<text class="margin-right">箱变名称:</text>
						<input style="color: #555555;font-size: 26rpx;" type="text" class="margin-top-sm" placeholder="请输入箱变名称"
							v-model="form.xbName" />
					</view>
					<view v-if="form.pointType == 2" class="constant_item padding solid-bottom">
						<text class="margin-right">配电室名称:</text>
						<input type="text" class="margin-top-sm" placeholder="请输入配电室名称" v-model="form.pdsName" />
					</view>
					<view class="constant_item flex align-center padding solid-bottom" v-show="this.form.pointType == 4">
						<text class="margin-right"
							style="font-size: 28rpx;font-family: PingFang SC;font-weight: 500;color: #333333;">杆塔序号:</text><input
							type="number" style="color:#555555" v-model="form.num" />
					</view>
					<view class="constant_item solid-bottom padding flex align-center" v-if="this.form.pointType == 5">
						<text class="margin-right">电缆井序号:</text>
						<input  type="number" v-model="form.num" />
					</view>
					<view class="constant_item solid-bottom padding-sm" v-if="this.form.pointType == 5">
						<text class="margin-right">电缆井类型:</text>
						<view class="constant_item_type flex margin-top-sm" style="flex-wrap: wrap;">
							<radio-group @change="radioChange_dtj" class="flex align-center" style="flex-wrap: wrap;">
								<label style="transform: scale(0.85);width: 33%;margin-bottom: 5rpx;"
									class="flex align-center  uni-list-cell uni-list-cell-pd" v-for="(item, index) in items_radio_dtjtype"
									:key="item.value">
									<view class="margin-right-sm">
										<radio :value="item.value" :checked="item.key == form.dljType" />
									</view>
									<view>{{ item.name }}</view>
								</label>
							</radio-group>
						</view>
					</view>
					<view class="constant_item padding solid-bottom"
						v-show="this.form.pointType == 4 || this.form.pointType == 1 || this.form.pointType == 3 || this.form.pointType == 2 || this.form.pointType == 6">
						<text class="margin-right "
							style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;">是否支线杆:</text>
						<!-- v-if="this.form.state_ == 0" -->
						<!-- <view  class="zxg_radio margin-top-sm paddin-top-sm flex align-center">
                            <view @click="changge_zxg(item.key)" :class="item.key == zxg_check1 ?'check_zxg':''" class="zxg_radio_item margin-right" style="text-align: center;"  v-for="(item,index) in zxg_radio_arr" :key = "item.key">
                                <text>{{item.value}}</text>
                            </view>
                        </view> -->
						<view class="padding-top-sm">
							<radio-group v-if="this.form.state_ != 0" @change="radioChangezxg" class="flex align-center"
								style="flex-wrap: wrap;">
								<label style="transform: scale(0.85);width: 33%;margin-bottom: 5rpx;"
									class="flex align-center  uni-list-cell uni-list-cell-pd" v-for="(item, index) in items_radio_zxg"
									:key="item.value">
									<view class="margin-right-sm">
										<radio :value="item.value" :checked="index === current1" />
									</view>
									<view style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #555555;">
										{{ item.name }}
									</view>
								</label>
							</radio-group>
							<radio-group v-if="this.form.state_ == 0" @change="radioChangezxg" class="flex align-center"
								style="flex-wrap: wrap;">
								<label style="transform: scale(0.85);width: 33%;margin-bottom: 5rpx;color: #0077AA;"
									class="flex align-center  uni-list-cell uni-list-cell-pd" v-for="(item, index) in items_radio_zxg"
									:key="item.value">
									<view class="margin-right-sm">
										<radio color="gray" disabled :value="item.value" :checked="index === current1" />
									</view>
									<view style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: gray">
										{{ item.name }}
									</view>
								</label>
							</radio-group>
						</view>
						<view v-show="this.form.pointType != 5 && this.current1 == 0" class="padding-top-sm">
							<text class="margin-right-sm" style="font-size: 26rpx;color: #333333;">支线名称:</text>
							<view style="width: 100%;height: 50rpx;margin-top: 10rpx;">
								<xfl-select ref="select" :list="list" :initValue="initValue" :clearable="true" :showItemNum="5"
									:isCanInput="this.form.pointType == 4 ? true : false" :style_Container="listBoxStyle"
									:placeholder="'请选择支线'" @change="change" @input="input">
								</xfl-select>
							</view>
						</view>
					</view>
					<!-- 我是表箱内容 -->
					<view class="gl_gt flex justify-between align-center padding solid-bottom" v-if="this.form.pointType == 6">
						<text style="color:#333333;font-size: 26rpx;">关联杆塔:</text>
						<view v-if="this.form.state_ == 0" style="width: 80%;font-size: 24rpx;">
							<text>{{ initValue_gt == "" ? '无' : initValue_gt }}</text>
						</view>
						<view v-if="this.form.state_ != 0" style="width: 80%;font-size: 24rpx;">
							<xfl-select ref="select_" 
								:list="form.tg_list" :initValue="initValue_gt == '' ? '请选择' : initValue_gt" :clearable="true"
								:showItemNum="5" :isCanInput="this.form.pointType == 4 ? true : false" :style_Container="listBoxStyle"
								:placeholder="'请选择支线杆塔'" @change="change_gt_gl" @input="input">
							</xfl-select>
						</view>
					</view>
					<view class="gl_gt flex justify-between padding solid-bottom " style=""
						v-if="this.form.pointType == 6 && this.initValue_bx_xlbh_ !== false">
						<text style="color:#333333;font-size: 26rpx;">当前表箱下路编号:</text>
						<view style="width: 65%;font-size: 26rpx;">
							<xfl-select ref="select__"
								:list="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]"
								:initValue="initValue_bx_xlbh == '' ? '请选择' : initValue_bx_xlbh" :clearable="true" :showItemNum="5"
								:isCanInput="this.form.pointType == 4 ? true : false" :style_Container="listBoxStyle"
								:placeholder="'请选择'" @change="change_bx_" @input="input">
							</xfl-select>
						</view>
					</view>
					<view class="gl_gt flex align-center padding solid-bottom " style="" v-if="this.form.pointType == 6">
						<text class="block" style="width: 30%;color:#333333;font-size: 26rpx;margin-right: 10rpx;">当前表箱序号:</text>
						<view style="width: 70%;" class=" flex align-center">
							<text style=" width: auto;color: #555555;font-size: 24rpx;">{{ bxname_ == '' ? '请选择标箱编号' : bxname_ }}</text>
							<input v-if="bxname_" type="text" style="font-size: 24rpx;color:#555555;" v-model="form.num_" />
						</view>
					</view>
					<view class="gl_gt flex justify-between align-center padding solid-bottom" v-if="this.form.pointType == 6">
						<text style="color:#333333;font-size: 26rpx;">相位:</text>
						<view  style="width: 80%;font-size: 24rpx;">
							<xfl-select ref="select_" 
								:list="['A','B','C']" :initValue="form.xiang == '' ? '请选择' : form.xiang" :clearable="true"
								:showItemNum="5"  :style_Container="listBoxStyle"
								:placeholder="'请选择相位'" @change="chengexiang" >
							</xfl-select>
						</view>
					</view>
					<!-- 我是支线表箱 -->
					<view class="constant_item padding solid-bottom" v-if="this.form.pointType == 6">
						<text class="margin-right"
							style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #333333;">是否支线表箱:</text>
						<!-- <view  class="zxg_radio margin-top-sm paddin-top-sm flex align-center">
                            <view @click="changge_zxg(item.key)" :class="item.key == zxg_check1 ?'check_zxg':''" class="zxg_radio_item margin-right" style="text-align: center;"  v-for="(item,index) in zxg_radio_arr" :key = "item.key">
                                <text>{{item.value}}</text>
                            </view>
                        </view> -->
						<view class="padding-top-sm">
							<radio-group @change="radioChangezx_bx" class="flex align-center" style="flex-wrap: wrap;">
								<label style="transform: scale(0.85);width: 33%;margin-bottom: 5rpx;"
									class="flex align-center  uni-list-cell uni-list-cell-pd" v-for="(item, index) in items_radio_zx_bx"
									:key="item.value">
									<view class="margin-right-sm">
										<radio :value="item.value" :checked="item.key === current_zx_bx" />
									</view>
									<view style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #555555;">
										{{ item.name }}
									</view>
								</label>
							</radio-group>
						</view>
					</view>
					<view @click="showTree" class="gl_gt flex align-center padding solid-bottom " style=""
						v-if="this.form.pointType == 6 && this.current_zx_bx == 1">
						<text style="color:#333333;font-size: 26rpx;margin-right: 10rpx;">关联表箱序号:</text>
						<text style="color: #555555;font-size: 26rpx;"> {{ gl_bxnum == "" ? '请选择' : gl_bxnum }}</text>
					</view>
					<view v-show="current1 !== 0" v-if="this.form.pointType == 1" class="constant_item padding solid-bottom">
						<text class="margin-right">是否同杆线路:</text>
						<view class="padding-top-sm">
							<radio-group @change="radioChangetg" class="flex align-center" style="flex-wrap: wrap;">
								<label style="transform: scale(0.85);width: 33%;margin-bottom: 5rpx;"
									class="flex align-center  uni-list-cell uni-list-cell-pd" v-for="(item, index) in items_radio_tg"
									:key="item.value">
									<view class="margin-right-sm">
										<radio :value="item.value" :checked="index === current" />
									</view>
									<view>{{ item.name }}</view>
								</label>
							</radio-group>
						</view>
						<view @tap="showPopup1" v-if="current === 0 && form.pointType == 1"
							class="tgzx_line padding-top-sm flex align-center">
							<text class="margin-right-sm" style="width: 190rpx;font-size: 26rpx;color: #555555;">同杆主线:</text>
							<text style="font-size: 24rpx;color:#555555;">{{ linenamehwz.length == 0 ? "请选择" :
                                linenamehwz }}</text>
						</view>
						<!-- <view   v-if="current==0 && line_list.length !== 0 && form.pointType != 1" class="padding-top-sm padding-bottom-sm align-center flex "  v-for="(item,index) in line_list" :key = "index">
                           <text class="margin-right block" style="color: #333333;" >{{item.linename}}序号</text>
                           <input style="font-size: 24rpx;color:#555555" type="text" v-model="item.num" />

                       </view> -->
					</view>

					<view v-show="current1 !== 0" v-if="this.form.pointType == 4" class="constant_item padding solid-bottom">
						<text class="margin-right"
							style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #333333;">是否同杆:</text>
						<view class="padding-top-sm">
							<radio-group @change="radioChangetg" class="flex align-center" style="flex-wrap: wrap;">
								<label style="transform: scale(0.85);width: 33%;margin-bottom: 5rpx;"
									class="flex align-center  uni-list-cell uni-list-cell-pd" v-for="(item, index) in items_radio_tg"
									:key="item.value">
									<view class="margin-right-sm">
										<radio :value="item.value" :checked="index === current" />
									</view>
									<view style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #555555;">
										{{ item.name }}
									</view>
								</label>
							</radio-group>
						</view>
						<!-- <view  class="tg_radio margin-top-sm paddin-top-sm flex align-center">
                            <view @click="changge_tg(item.key)" :class="item.key == tg_check1 ?'check_zxg':''" class="zxg_radio_item margin-right" style="text-align: center;"  v-for="(item,index) in tg_radio_arr" :key = "item.key">
                                <text>{{item.value}}</text>
                            </view>
                        </view> -->

						<view @tap="showPopup" v-if="current === 0 && form.pointType == 4"
							class="tgzx_line padding-top-sm flex align-center">
							<text class="margin-right-sm" style="width: 190rpx;font-size: 26rpx;color: #333333;">同杆主线:</text>
							<text style="font-size: 24rpx;color: #555555;font-size: 24rpx;">{{ linenamexj.length == 0 ? "请选择" :
                                linenamexj }}</text>

						</view>
						<view v-if="current == 0 && line_list.length !== 0 && form.pointType === 4"
							class="padding-top-sm padding-bottom-sm align-center flex " v-for="(item, index) in line_list"
							:key="index">
							<view class="" style="width:500rpx">
								<text class="margin-right" style="color: #555555;font-size: 24rpx;">{{ item.linename }}序号</text>
							</view>
							<input type="text" v-model="item.num" />
							<!-- <text>{{item.id}}</text> -->
						</view>
					</view>
					<!-- 我是表箱电源同杆 -->
					<view class="istg_dy solid-bottom" v-if="form.pointType == 6 && form.dbxType == 1">
						<view class="istg_dy_title padding">
							<text>是否不同电源同杆:</text>
							<!-- 我是按钮 -->
							<view class="padding-top-sm">
								<radio-group @change="radioChangebx_tg" class="flex align-center" style="flex-wrap: wrap;">
									<label style="transform: scale(0.85);width: 33%;margin-bottom: 5rpx;"
										class="flex align-center  uni-list-cell uni-list-cell-pd" v-for="(item, index) in items_radio_bx_tg"
										:key="item.value">
										<view class="margin-right-sm">
											<radio :value="item.value" :checked="item.key === bxcurrent" />
										</view>
										<view style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #555555;">
											{{ item.name }}
										</view>
									</label>
								</radio-group>
							</view>
						</view>
						<view v-if="bxcurrent == 1" class="istg_dy_cont margin-bottom" style="width:100%;">
							<view class="istg_dy_cont_top flex align-center justify-between padding-left-sm padding-right-sm"
								style="width: 100%;height:70rpx;">
								<view @click="check_bx_type(index)" style="color: #555555;" :class="index == check_bx ? 'blue' : ''"
									class="istg_dy_cont_top_item" v-for="(item, index) in bx_tg_arr" :key="index">
									<text style="font-size: 24rpx;">{{ item.name }}</text>
								</view>
							</view>
							<view class="istg_dy_cont_bottom padding flex align-center">
								<text class="margin-right" style="color: #333333;font-size: 26rpx;">同杆线路名称:</text>
								<input type="text" style="font-size: 26rpx;color:#555555" placeholder="请输入同杆线路名称"
									v-model="form.powerSupplyMainName" />
							</view>
						</view>
					</view>
					<view class="padding flex solid-bottom align-center" v-if="form.pointType == 6 && this.form.dbxType == 2">
						<text class="margin-right"
							style="font-size: 26rpx;font-family: PingFang SC;font-weight: 500;color: #333333;">墙铁数量:</text>
						<input type="number" style="font-size: 26rpx;" v-model="form.qtNum" placeholder="请输入墙铁数量" />
					</view>
					<!-- 表箱照片 -->
					<view class="padding solid-bottom" v-if="form.pointType == 6">
						<text style="font-size: 26rpx;color: #333333;" class="margin-right"> {{ form.dbxType == 2 ?
                            '联络点照片' : '表箱照片' }}:</text>
						<imgUpload :fild_list="form.fild_list || []" :linenameId="form.linenameId" :pointType="form.pointType"
							:num="form.num_" :id="form.id" :img_list="form.gpsCoordinateFileEntities" :count="count"
							@obtain_img="obtain_img" :name="name" :header="header" :url="url01" :formData="formdata"></imgUpload>
					</view>
					<view v-if="this.form.pointType == 6" class="padding solid-bottom">
						<text>备注:</text>
						<textarea maxlength="300" style="font-size:28rpx; color:#555555;height:180rpx;min-height:70rpx;width:100%"
							placeholder="请输入备注" v-model="form.remark" />
					</view>
					<view v-if="form.pointType == 4" class="constant_item padding-sm solid-bottom">
						<text style="font-size: 26rpx;color: #333333;">{{ this.form.linename }}序号图片</text>
						<imgUpload :pointType="form.pointType" :linename="form.linename" :linenameId="form.linenameId"
							:num="form.num" :img_list="this.form.images" :count="count" @obtain_img="obtain_img" :name="name"
							:header="header" :url="url" :formData="formdata"></imgUpload>
					</view>
					<view v-if="line_list.length !== 0 && form.pointType == 4 && current === 0"
						class="constant_item padding-sm solid-bottom" v-for="item in line_list" :key="item.num">
						<text style="font-size: 26rpx;color: #333333;" class="margin-right"> {{ item.linename }}杆塔照片:</text>
						<imgUpload v-if="item.images" :key="item.num" :linename="item.linename" :num="item.num"
							:img_list="item.images.length == 0 ? [] : item.images" :count="count" @obtain_img="obtain_img"
							:name="name" :header="header" :url="url" :formData="formdata"></imgUpload>
					</view>
					<!-- 我是电梯井上传图片 -->
					<!-- <view v-if="form.pointType == 5 "  class="constant_item padding-sm solid-bottom"   v-for="item in form.gpsCoordinateFileEntities" :key = "item.fileId">
                        <text class="margin-right"> {{item.uploadName}}照片:</text>
                        <imgUpload   :num = "form.num" :key="item.fileId" :visualAngle = "item.visualAngle" :dljType= "form.dljType"  :pointType = "form.pointType" :linenameId = "form.linenameId"  :fileId = "item.fileId" :id = "form.id"  :img_list= "[item.url]" :count="count" @obtain_img="obtain_img" :name="name" :header="header" :url="url01" :formData = "formdata"></imgUpload>
                    </view> -->
					<view v-if="form.pointType == 5" class="constant_item padding-sm solid-bottom">
						<text style="font-size: 26rpx;color: #333333;"
							class="margin-right">{{ this.form.linename }}{{ this.form.num }} 号电缆井东面照片:</text>
						<imgUpload :fild_list="form.dtjd_fild_list || []" :id="form.id" :num="form.num" :visualAngle="1"
							:img_list="this.form.dtjd_list || []" :dljType="form.dljType" :pointType="form.pointType"
							:linenameId="form.linenameId" :count="count" @obtain_img="obtain_img" :name="name" :header="header"
							:url="url01" :formData="formdata"></imgUpload>
					</view>
					<view v-if="form.pointType == 5" class="constant_item padding-sm solid-bottom">
						<text style="font-size: 26rpx;color: #333333;"
							class="margin-right">{{ this.form.linename }}{{ this.form.num }} 号电缆井西面照片:</text>
						<imgUpload :fild_list="form.dtjx_fild_list || []" :id="form.id" :num="form.num" :visualAngle="2"
							:dljType="form.dljType" :pointType="form.pointType" :linenameId="form.linenameId"
							:img_list="this.form.dtjx_list || []" :count="count" @obtain_img="obtain_img" :name="name"
							:header="header" :url="url01" :formData="formdata"></imgUpload>
					</view>
					<view v-if="form.pointType == 5" class="constant_item padding-sm solid-bottom">
						<text style="font-size: 26rpx;color: #333333;"
							class="margin-right">{{ this.form.linename }}{{ this.form.num }} 号电缆井南面照片:</text>
						<imgUpload :fild_list="form.dtjn_fild_list || []" :id="form.id" :num="form.num" :visualAngle="3"
							:dljType="form.dljType" :pointType="form.pointType" :linenameId="form.linenameId"
							:img_list="this.form.dtjn_list || []" :count="count" @obtain_img="obtain_img" :name="name"
							:header="header" :url="url01" :formData="formdata"></imgUpload>
					</view>
					<view v-if="form.pointType == 5" class="constant_item padding-sm solid-bottom">
						<text style="font-size: 26rpx;color: #333333;"
							class="margin-right">{{ this.form.linename }}{{ this.form.num }} 号电缆井北面照片:</text>
						<imgUpload :fild_list="form.dtjb_fild_list || []" :id="form.id" :num="form.num" :visualAngle="4"
							:dljType="form.dljType" :pointType="form.pointType" :linenameId="form.linenameId"
							:img_list="this.form.dtjb_list || []" :count="count" @obtain_img="obtain_img" :name="name"
							:header="header" :url="url01" :formData="formdata"></imgUpload>
					</view>
					<view v-if="form.pointType == 5" class="constant_item padding-sm solid-bottom">
						<text class="margin-right">{{ this.form.linename }}{{ this.form.num }} 号电缆井俯视照片:</text>
						<imgUpload :fild_list="form.dtjf_fild_list || []" :id="form.id" :num="form.num" :visualAngle="5"
							:dljType="form.dljType" :pointType="form.pointType" :linenameId="form.linenameId"
							:img_list="this.form.dtjf_list || []" :count="count" @obtain_img="obtain_img" :name="name"
							:header="header" :url="url01" :formData="formdata"></imgUpload>
					</view>
					<view v-if="form.pointType == 5" class="constant_item padding-sm solid-bottom">
						<text style="font-size: 26rpx;color: #333333;"
							class="margin-right">{{ this.form.linename }}{{ this.form.num }}号电缆井接地箱照片:</text>
						<imgUpload :fild_list="form.dtjj_fild_list || []" :id="form.id" :num="form.num" :visualAngle="6"
							:dljType="form.dljType" :pointType="form.pointType" :linenameId="form.linenameId"
							:img_list="this.form.dtjj_list || []" :count="count" @obtain_img="obtain_img" :name="name"
							:header="header" :url="url01" :formData="formdata"></imgUpload>
					</view>
					<view v-if="form.pointType == 5" class="constant_item padding-sm solid-bottom">
						<text style="font-size: 26rpx;color: #333333;" class="margin-right">其他照片:</text>
						<imgUpload :fild_list="form.dtjq_fild_list || []" :id="form.id" :num="form.num" :visualAngle="9"
							:dljType="form.dljType" :pointType="form.pointType" :linenameId="form.linenameId"
							:img_list="this.form.dtjq_list || []" :count="count" @obtain_img="obtain_img" :name="name"
							:header="header" :url="url01" :formData="formdata"></imgUpload>
					</view>
					<!-- 我是环网站上传图片 -->
					<view class="padding" v-if="form.pointType == 1">
						<text style="font-size: 26rpx;color: #333333;" class="margin-right"> 环网站照片:</text>
						<imgUpload :fild_list="form.fild_list || []" :linenameId="form.linenameId" :pointType="form.pointType"
							:num="form.num" :id="form.id" :img_list="form.gpsCoordinateFileEntities" :count="count"
							@obtain_img="obtain_img" :name="name" :header="header" :url="url01" :formData="formdata">
						</imgUpload>
					</view>
					<!-- 我是箱变上传图片 -->
					<view class="padding" v-if="form.pointType == 3">
						<text style="font-size: 26rpx;color: #333333;" class="margin-right"> 箱变照片:</text>
						<imgUpload :fild_list="form.fild_list || []" :linenameId="form.linenameId" :pointType="form.pointType"
							:num="form.num" :id="form.id" :img_list="form.gpsCoordinateFileEntities" :count="count"
							@obtain_img="obtain_img" :name="name" :header="header" :url="url01" :formData="formdata"></imgUpload>
					</view>
					<!-- 我是配电室上传图片 -->
					<view class="padding" v-if="form.pointType == 2">
						<text style="font-size: 26rpx;color: #333333;" class="margin-right"> 配电室照片:</text>
						<imgUpload :fild_list="form.fild_list || []" :linenameId="form.linenameId" :pointType="form.pointType"
							:num="form.num" :id="form.id" :img_list="form.gpsCoordinateFileEntities" :count="count"
							@obtain_img="obtain_img" :name="name" :header="header" :url="url01" :formData="formdata">
						</imgUpload>
					</view>
				</view>
			</scroll-view>
			<view class="bottom_ solid-top flex justify-between align-center">
				<view @click="update" class="queding flex justify-center align-center"
					style=" border-right: 1rpx solid #999999;width: 50%;height: 50%;">
					<text>确定</text>
				</view>
				<view @click="dellat" class="canls flex justify-center align-center" style="width: 50%;height: 50%;">
					<text>删除</text>
				</view>
				<view class="daobox">
					<image class="daoicon" src="@/static/img/daoicon.png" alt="">
						<text class="godao" @click="goBdMap">到这里去</text>
						</image>
				</view>
			</view>
		</view>
		<!-- 铜杆主线 下拉选择 -->
		<uni-popup ref="popup" type="bottom">
			<tongtong-select ref="tongtong_select" :iscanls="iscanls" :isMultiple="isMultiple" :list="memberList"
				:defaultValue="memberSelected" showParam="linename" @cancel="cancelFun" @change="memberChange">
			</tongtong-select>
		</uni-popup>
		<!-- 环网站 下拉选择 -->
		<uni-popup ref="popup1" type="bottom">
			<tongtong-select ref="tongtong_select" :iscanls="iscanls" :isMultiple="isMultiple" :list="memberList"
				:defaultValue="memberSelected" showParam="linename" @cancel="cancelFun1" @change="memberChange1">
			</tongtong-select>
		</uni-popup>
		<!-- 我是树状图 -->
		<tki-tree ref="tkitree" :selectParent="selectParent" :multiple="multiple" :range="list__tree" :foldAll="flod"
			rangeKey="nameName" @confirm="treeConfirm" @cancel="treeCancel"></tki-tree>

	</view>
</template>

<script>
	var util = require("../../common/util");
	var api = require("../../common/api");
	import open_hd from "@/pages/home/subnvue/open_hd"
	import open_gh from "@/pages/home/subnvue/open_gh"
	import open from '@/pages/home/subnvue/open'
	import homeMap from '@/pages/home/home_map.nvue';
	import goodsBottom from '@/pages/home/subnvue/goodsBottom'
	import tongtongSelect from '@/components/tongtong-select/tongtong-select.vue';
	import tkiTree from '@/components/tki-tree/tki-tree.vue';
	import imgUpload from '@/components/linzq-imgUpload/linzq-imgUpload.vue'
	import xflSelect from '../../components/xfl-select/xfl-select.vue';
	export default {
		components: {
			open_hd,
			open,
			open_gh,
			goodsBottom,
			xflSelect,
			imgUpload,
			tongtongSelect,
			tkiTree,
			homeMap
		},
		data() {
			return {
				check_bx_: 0,
				check_bx_type_index: 0,
				initValue_bx_xlbh_: true,
				gl_bxnum: "",
				selectParent: true,
				// 我是树状图
				list__tree: [
				// 	{
				// 	id: 6,
				// 	name: '湖南省',
				// },
			 ],
				multiple: false,
				flod: false,
				// 是否支线表箱
				current_zx_bx: 0,
				// 当前表箱下路编号
				initValue_bx_xlbh: "",
				initValue_gt: "",
				check_bx: 0,
				// 我是电源同杆四种类型
				bx_tg_arr: [{
						name: "通信线"
					},
					{
						name: "路灯线"
					},
					{
						name: "表后线"
					},
					{
						name: "高压线"
					}
				],
				bx_type: [{
						name: "表箱点"
					},
					{
						name: "联络点"
					}
				],
				initValue_bxiang:'',
				// 我是变箱选择
				bxcurrent: 0,
				ztlx_check1: 1,
				tg_check1: 1,
				zxg_check1: 1,
				iscanls: false,
				initValue: "",
				isshow_data: false,
				// 我是未采集坐标信息列表
				notcollectedForm: {},
				// 我是直线下拉
				listBoxStyle: `height: 40rpx; font-size: 30rpx;`,
				list: [

				],
				satellite: true,
				check_: 4,
				// 我是多选数据
				linearr: [],
				// 我是多级主线
				linenamexj: "",
				linenamehwz: "",
				isMultiple: true,
				memberSelected: ['张三'],
				//会员list数据
				memberList: [],
				// 我是多选数据结束
				disabled: false,
				form: {
					tg_list:[],
					state_:1,
					name: "杭州测试中心",
					images: [],
					// 可能是字符串
					// num: Number,
					num: '',
					poinType: 6,
					num_: 6,
					hwzName: "",
					isshow_close: true
				},
				line_list: [],
				tg_linelist: [],
				tgline_name: [],
				seach_line: "",
				line_id: "",
				choose_type_arr: [{
						name: "塔杆",
						pointType: 4
					},
					{
						name: "环网站",
						pointType: 1
					},
					{
						name: "箱变",
						pointType: 3
					},
					{
						name: "配电室",
						pointType: 2
					},
					{
						name: "电缆井",
						pointType: 5
					},
					{
						name: "表箱",
						pointType: 6
					},
				],
				// 我是单选框
				items_radio_dtjtype: [{
						value: 'huanwangzhan',
						name: '操作井',
						key: 1,
						checked: 'true'
					},
					{
						key: 2,
						value: 'peidianshi',
						name: '顶管井'
					},
					{
						key: 3,
						value: 'xiangbian',
						name: '接头井',
						checked: 'true'
					},
					{
						value: 'ganta',
						name: '转弯井',
						key: 4
					},
				],
				gt_items: [],
				items_radio_zxg: [{
						value: 'true',
						name: '是'
					},
					{
						value: 'false',
						name: '否',
						checked: 'true'
					},
				],
				items_radio_zx_bx: [{
						key: 1,
						value: 'true',
						name: '是'
					},
					{
						key: 0,
						value: 'false',
						name: '否',
						checked: 'true'
					},
				],
				items_radio_bx_tg: [{
						key: 1,
						value: 'true',
						name: '是'
					},
					{
						key: 0,
						value: 'false',
						name: '否',
						checked: 'true'
					},
				],
				items_radio_tg: [{
						key: 1,
						value: 'true',
						name: '是'
					},
					{
						key: 0,
						value: 'false',
						name: '否',
						checked: 'true'
					},

				],
				items_radio: [{
						value: 'ganta',
						name: '杆塔',
						key: 4
					},
					{
						value: 'huanwangzhan',
						name: '环网站',
						key: 1,
						checked: 'true'
					},
					{
						key: 2,
						value: 'peidianshi',
						name: '配电室'
					},
					{
						key: 3,
						value: 'xiangbian',
						name: '箱变',
						checked: 'true'
					},
					{
						key: 5,
						value: 'dianlanjing',
						name: '电缆井'
					},
					{
						key: 6,
						value: 'biaoxiang',
						name: '表箱'
					},
				],
				currenttype: 0,
				current: 0,
				current1: 0,
				current_dtj: 0,
				// 我是上传图片
				images_list: [
					'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F1113%2F092919113248%2F1Z929113248-8-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1648531918&t=bd5276b1916d0d4e8df5b707182376cc',
					'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F1113%2F092919113248%2F1Z929113248-8-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1648531918&t=bd5276b1916d0d4e8df5b707182376cc',
				],
				count: 20,
				name: 'files',
				url: api.apis.gpscoordinatefile1,
				url01: api.apis.gpscoordinatefile,
				header: {

				},
				token: "",
				formdata: {

				},
				// 我是上传图片结束
				cover_type: false,
				line: "",
				isshow: false,
				isshowstop: false,
				scrollTop: 0,
				// 所有线路
				items: [{
					linename: "全部",
					id: ""
				}],
				latitude: 30.190862540958,
				longitude: 120.167049685097,
				// 我是坐标
				covers: [],
				scale: 10,
				issshow_choose_type: false,
				zxg_radio_arr: [{
						value: "是",
						key: 1
					},
					{
						value: "否",
						key: 0
					}
				],
				tg_radio_arr: [{
						value: "是",
						key: 1
					},
					{
						value: "否",
						key: 0
					}
				],
				ztlx_radio_arr: [{
						value: "塔杆",
						key: 1
					},
					{
						value: "环网站",
						key: 2
					},
					{
						value: "配电室",
						key: 3
					},
					{
						value: "箱变",
						key: 4
					},
					{
						value: "电缆井",
						key: 5
					},
					{
						value: "表箱",
						key: 6
					},
				],
				bxname_: "",
				site: {
					position: []
				},
				// 点击点的导航点位信息
				daohang: {

				}

			};
		},
		computed: {

		},
		mounted() {
			try {
				const subNVue2 = uni.getSubNVueById('goodsBottom')
				subNVue2.show()
				const subNVue1 = uni.getSubNVueById('home_map')
				subNVue1.show()

			} catch (e) {

			}

			this.send_message();
			// 获取登录用户信息
			this.gettoken()
			// 查询主线列表
			this.getgpsall()

			uni.$on("index", res => {
				if(this.isshowstop){
				    return uni.showToast({
				        title:"请先完成点位操作",
				        icon:"none"
				    })
				}
				const subNVue1 = uni.getSubNVueById('home_map')
				subNVue1.setStyle({
					"width": "100%",
					"background": "transparent",
					"height": "50%",
					"zindex": 2
				})
				this.isshow = true
			})
			uni.$on("getLoact_map", res => {
				this.getRegionalList()
			})
			uni.$on("clickmaker", res => {
				console.log(res)
				this.clickdetil(res)
			})
		},
		watch: {

		},
		methods: {
			getdata_(e, e1) {

				let gt_id = this.gt_items.filter(res => {
					return res.num == String(this.initValue_gt)
				})[0].id
				this.getBdxNum(e, e1, gt_id).then((num_) => {
					if (num_.code == 0) {
						this.initValue_bx_xlbh_ = false
						if (num_.bdxNum.goDownTheRoadNum == 0) {
							setTimeout(res => {
								console.log(num_.bdxNum)
								this.initValue_bx_xlbh = e
								this.initValue_bx_xlbh_ = true
							}, 0)
						} else {
							setTimeout(res => {
								this.initValue_bx_xlbh = num_.bdxNum.goDownTheRoadNum
								this.initValue_bx_xlbh_ = true
								this.bxname_ = num_.bdxNum.goDownTheRoadNum + '-' + (num_.bdxNum.intermediateLine == "0" ? '' :
									num_.bdxNum.intermediateLine + '-')
							}, 0)
						}
						this.form.num_ = parseInt(num_.bdxNum.num) + 1
						this.$forceUpdate()
					}

				})
			},
			// 确定回调事件
			treeConfirm(e) {
				console.log(e)
				this.form.regionalDbxId = e[0].id
				if (e[0].parents.length == 0) {
					this.current_zx_bx = 0
					this.initValue_bx_xlbh_ = false
					console.log(e)
					setTimeout(res => {
						this.initValue_bx_xlbh = e[0].parents[0].nameName
						this.initValue_bx_xlbh_ = true
					}, 0)
					this.getdata_(e[0].parents[0].nameName, "0")
					return
				}
				if (e[0].parents.length == 1) {
					this.gl_bxnum = e[0].nameName
					let str = e[0].parents[0].nameName + "-"
					console.log(str)
					// console.log(e[0].parents[1].name)
					this.form.intermediateLine = e[0].nameName.replace(str, "")
					var intermediateLine = this.form.intermediateLine
				} else {
					console.log("我进来了33")
					let str = e[0].parents[0].nameName + "-"
					console.log(str)
					this.form.intermediateLine = e[0].nameName.replace(str, "")
					console.log(this.form.intermediateLine)
					this.gl_bxnum = e[0].parents[1].nameName + "-" + e[0].name
					var intermediateLine = this.form.intermediateLine
				}
				// this.bxname_ = e[0].parents[0].name + '-' + e[0].parents[1].name  + "-"   + e[0].name
				this.gl_bxnum = this.gl_bxnum
				this.bxname_ = this.gl_bxnum + '-'
				this.getdata_(e[0].parents[0].nameName, intermediateLine)
				this.$forceUpdate()

			},
			// 取消回调事件
			treeCancel(e) {
				console.log(e)
			},

			getTreeList() {

			},
			// 显示树形选择器
			showTree() {
				if (this.initValue_gt == '' || this.initValue_gt == null) {
					return uni.showToast({
						title: "请先选择关联杆塔",
						icon: "none"
					})
				}
				// 树状图数据
				this.toshowtree().then(res => {
					console.log(res)
					if (res.code == 0) {
						let arr = res.relationNumDTOS
						this.tree_arr = arr
						let newarr = []
						console.log(arr)
						let str = JSON.stringify(arr)
						var newstr = str.myReplace('intermediateLineDTOS', 'children');
						newstr = newstr.myReplace('goDownTheRoadNum', 'name');
						newstr = newstr.myReplace('intermediateLine', 'name');
						newstr = newstr.myReplace('dbxNumDTOS', 'children');
						newstr = JSON.parse(newstr.myReplace('num', 'name'))
						for (var i = 0; i < newstr.length; i++) {
							newstr[i].id = parseInt(Math.random() * 1000)
							if (newstr[i].children.length != 0) {
								for (var j = 0; j < newstr[i].children.length; j++) {
									if (newstr[i].children[j].name == 0) {
										if (newstr[i].children[j].children.length != 0) {
											for (let b = 0; b < newstr[i].children[j].children.length; b++) {
												var arr_ = newstr[i].children
												let newarr1 = arr_.map(res => {
													return res.name
												})
												if (!newarr1.includes(newstr[i].children[j].children[b].name)) {
													newstr[i].children.push(newstr[i].children[j].children[b])
												} else {

												}
											}
										}
										newstr[i].children.splice(j, 1)
									}
								}
							}
						}
						this.list__tree = newstr
						console.log(newstr)
						this.open_map()
						this.$refs.tkitree._show();
					}
				})
			},
			// 我是选择电源同杆线
			check_bx_type(e) {
				this.check_bx = e
			},
			check_bx_type_(e) {
				this.form.dbxType = e + 1
			},
			// 我是打开树状图
			toshowtree() {
				console.log(this.gt_items)
				let gt_id = this.gt_items.filter(res => {
					return res.num == String(this.initValue_gt)
				})[0].id
				console.log(gt_id)
				let data = {
					collectId: gt_id,
					regionalId: this.form.regionalId || '',
					linenameId: this.form.linenameId,
				}
				if (data.regionalId == null || data.regionalId == '') {
					delete data.regionalId
				}
				console.log(data)
				return new Promise((res, rej) => {
					util.myrequest(
						api.apis.getRelationNum,
						data,
						"GET"
					).then(reson => {
						let arr = reson
						if (reson.code == 0) {
							res(reson)
						}
					})
				})
			},
			changge_ztlx(e) {
				this.ztlx_check1 = e
			},
			changge_zxg(e) {
				this.zxg_check1 = e
			},
			changge_tg(e) {
				this.tg_check1 = e
			},
			tochangelinwId() {
				if (!this.line_id && this.form.pointType != 6) {
					this.isshow = true
					this.choose_linenameId = true
				}
				return
			},
			bd_encrypt(gg_lng, gg_lat) {
				var X_PI = Math.PI * 3000.0 / 180.0;
				var x = gg_lng,
					y = gg_lat;
				var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * X_PI);
				var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * X_PI);
				var bd_lng = z * Math.cos(theta) + 0.0065;
				var bd_lat = z * Math.sin(theta) + 0.006;
				return {
					lat: bd_lat,
					lng: bd_lng
				};
			},
			send_message() {
				uni.$emit("getLoact", {
					name: ""
				})
			},
			close_map() {
				const subNVue1 = uni.getSubNVueById('home_map')
				subNVue1.setStyle({
					"width": "100%",
					"background": "transparent",
					"height": "100%",
					"zindex": 2
				})
				this.isshow = false
			},
			open_map() {
				this.isshowstop = true
				const subNVue1 = uni.getSubNVueById('home_map')
				subNVue1.setStyle({
					"width": "100%",
					"background": "transparent",
					"height": "40%",
					"zindex": 2
				})

			},
			input(e) {
				this.form.num = 1
				this.form.regionalId = ""
				this.form.regionalName = e.detail.value || ""
			},
			obtain_img(e) {
				if (this.form.pointType == 4) {
					for (let i = 0; i < this.line_list.length; i++) {
						if (this.line_list[i].num == e.num) {
							this.line_list[i].images = e.images
						}
					}
					return uni.showToast({
						title: "操作成功",
						icon: "none"
					})
				}
				uni.showToast({
					title: "操作成功",
					icon: "none"
				})

			},
			gettoken() {
				var that = this
				uni.getStorage({
					key: "token",
					success: function(e) {
						that.token = e.data
					}
				})
			},
			// 判断有无支线干
			getCollectCount() {
				let data = {
					linenameId: this.line_id,
				}
				console.log(data)
				return new Promise((res, rej) => {
					util.myrequest(
						api.apis.getCollectCount,
						data,
						"GET"
					).then(reson => {
						res(reson)
					})
				})

			},

			// 我是选择类型确定
			choose_type_qd() {
				this.form = {}
				this.form.pointType = this.check_
				if (this.form.pointType == 6) {
					this.getCollectList().then(res => {
						this.getCollectCount().then(reson => {
							console.log(reson)
							console.log(res)
							if (res.nums.length == 0 && reson.whether == 0) {
								return uni.showToast({
									title: "该线路并无杆塔",
									icon: "none"
								})
							} else {
								this.initValue = ""
								this.current1 = 1
								this.current = 1
								this.form.images = []
								this.form.line_list = []
								this.issshow_choose_type = false
								let long_lat = this.bd_encrypt(this.notcollectedForm.longitude, this.notcollectedForm.latitude)
								var date = new Date()
								util.myrequest(
									api.apis.saveAll, {
										vehicleId: this.notcollectedForm.vehicleId,
										deviceCode: this.notcollectedForm.deviceCode,
										dataDate: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`,
										linenameId: Number(this.line_id),
										pointType: this.check_,
										lat: long_lat.lat,
										lng: long_lat.lng,
										//新设置
										gpsLat: this.notcollectedForm.gpsLatitude,
										gpsLng: this.notcollectedForm.gpsLngitude,
										createName: uni.getStorageSync("username")
									},
									"POST"
								).then(res => {
									if (res.code == 0) {
										this.line_list = []
										if (res.coordinateGpsVO.poinType == 6) {
											// 我是表箱进来了
											if (reson.whether == 1) {
												this.gettowerInformation(res)
											} else {
												this.gettowerInformation(res, 1)
											}
											return
										}
										if (res.coordinateGpsVO.poinType == 1) {
											this.gettowerInformation(res)
											return
										}
										this.getLatestNum(res)
										return
									}
								})
							}
						})

					})
				} else {
					this.initValue = ""
					this.current1 = 1
					this.current = 1
					this.form.images = []
					this.form.line_list = []
					this.issshow_choose_type = false
					let long_lat = this.bd_encrypt(this.notcollectedForm.longitude, this.notcollectedForm.latitude)
					var date = new Date()
					util.myrequest(
						api.apis.saveAll, {
							vehicleId: this.notcollectedForm.vehicleId,
							deviceCode: this.notcollectedForm.deviceCode,
							dataDate: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`,
							linenameId: Number(this.line_id),
							pointType: this.check_,
							lat: long_lat.lat,
							lng: long_lat.lng,
							//新设置
							gpsLat: this.notcollectedForm.gpsLatitude,
							gpsLng: this.notcollectedForm.gpsLngitude,
							createName: uni.getStorageSync("username")
						},
						"POST"
					).then(res => {
						if (res.code == 0) {
							this.line_list = []
							if (res.coordinateGpsVO.poinType == 6) {
								// 我是表箱进来了
								this.gettowerInformation(res)
								return
							}
							if (res.coordinateGpsVO.poinType == 1) {
								this.gettowerInformation(res)
								return
							}
							this.getLatestNum(res)
							return
						}
					})
				}

			},
			// 判断是否同杆
			ifSamePole() {
				return new Promise((res, rej) => {
					util.myrequest(
						api.apis.ifSamePole + this.line_id, {},
						"GET"
					).then(reson => {
						if (reson.code == 0 && reson.mainLines.length != 0) {
							res(reson)
						} else {
							rej("没有同杆")
						}

					})
				})

			},
			getnum(id) {
				return new Promise((res, rej) => {
					util.myrequest(
						api.apis.getLatestNum, {
							linenameId: id
						},
						"GET"
					).then(reson => {
						if (reson.code == 0) {
							res(reson)
						}
					})
				})

			},
			// 获取支线num值
			getzxnum(zxid) {
				return new Promise((res, rej) => {
					util.myrequest(
						api.apis.getLatestNum, {
							regionalId: zxid,
							linenameId: this.form.linenameId
						},
						"GET"
					).then(reson => {
						if (reson.code == 0) {
							res(reson)
						}
					})
				})

			},
			// 获取红点num值
			getLatestNum(e) {
				util.myrequest(
					api.apis.getLatestNum, {
						linenameId: this.line_id
					},
					"GET"
				).then(res => {
					if (res.code == 0) {
						this.gettowerInformation(e, res.num)
					}
				})
			},
			// 我是红点信息回显
			gettowerInformation(e, index) {
				// 我是表箱红点
				console.log('red')
				if (e.coordinateGpsVO.pointType == 6) {
					util.myrequest(
						// 我是请求表箱红点详情
						api.apis.gpscoordinatedbxInfo + e.coordinateGpsVO.id, {},
						"GET"
					).then(res => {
						if (res.code == 0) {
							this.form = res.gpsCoordinateDbx
							this.form.dbxType = 1
							this.form.linename = this.items.filter(reson => {
								return reson.id == this.form.linenameId
							})[0].name
							this.getRegionalList().then(reson => {
								if (this.list.length == []) {
									return
								} else {
									this.initValue = this.list[0].value
								}
							})
							this.getCollectList().then(resons => {
								if (resons.code == 0) {
									if (resons.nums.length == 0 && index == 1) {
										console.log("我进来了")
										this.getRegionalList1().then(reson => {
											console.log(reson)
											// return
											// console.log(reson.regionalEntities[0].regionalName)
											console.log(this.list)
											let regid = this.list.filter(res => {
												return res.id == reson.regionalEntities[0].id
											})[0]
											console.log(regid)
											this.initValue = regid.value
											console.log(regid.id)
											this.form.regionalId = regid.id
											this.getCollectList(regid.id).then(res => {
												console.log("我进来了")
												console.log(res)
												this.form.tg_list = []
												let arr = []
												res.nums.forEach(tg_num => {
													arr.push(tg_num.num)
												})
												this.form.tg_list = arr
												this.gt_items = res.nums
												this.form.state = 0
												this.initValue_bx_xlbh_ = false
												this.bxname_ = ""
												setTimeout(res => {
													// 我是带入关联杆塔
													this.initValue_gt = ""
													this.initValue_bx_xlbh = ""
													this.initValue_bx_xlbh_ = true
													this.form.state = 1
												})

												this.$forceUpdate()
												this.current1 = 0
												this.open_map()
												this.form.isshow_close = false
												this.isshowstop = true
											})
										})

										return
									} else {
										let arr = []
										this.gt_items = resons.nums
										if (this.gt_items.length == 0) {
											return uni.showToast({
												title: "此线路没有杆塔",
												icon: "none"
											})
										} else {
											console.log("我有支线")
										}
										resons.nums.forEach(tg_num => {
											arr.push(tg_num.num)
										})
										this.form.tg_list = arr || ""
									}
									this.getBdxNum("", "", "").then((num_) => {
										if (num_.bdxNum.lineType == 1) {
											this.getRegionalList().then(reson => {
												if (this.list.length == []) {
													return
												} else {
													console.log(num_)
													let regid = this.list.filter(res => {
														return res.id == num_.bdxNum.regionalId
													})[0]
													this.initValue = regid.value
													console.log(regid.id)
													this.form.regionalId = regid.id
													this.getCollectList(regid.id).then(res => {
														console.log("我进来了")
														console.log(res)
														this.form.tg_list = []
														let arr = []
														res.nums.forEach(tg_num => {
															arr.push(tg_num.num)
														})
														this.form.tg_list = arr
														this.gt_items = res.nums
														this.form.state = 0
														setTimeout(res => {
															// 我是带入关联杆塔
															this.initValue_gt = num_.bdxNum.collectNum == null ? this.gt_items[
																0].num : num_.bdxNum.collectNum
															this.form.state = 1
														})
														if (num_.bdxNum.intermediateLine != 0) {
															this.current_zx_bx = 1
														} else {
															this.current_zx_bx = 0
														}
														if (num_.bdxNum.goDownTheRoadNum != 0 && num_.bdxNum.goDownTheRoadNum !=
															null) {
															this.initValue_bx_xlbh = num_.bdxNum.goDownTheRoadNum
															this.form.intermediateLine = num_.bdxNum.intermediateLine
															if (num_.bdxNum.intermediateLine != 0) {
																this.current_zx_bx = 1
																if (num_.bdxNum.num != 0) {
																	this.bxname_ = num_.bdxNum.goDownTheRoadNum + ' - ' + num_.bdxNum
																		.intermediateLine + ' - '
																	this.gl_bxnum = num_.bdxNum.goDownTheRoadNum + ' - ' + num_.bdxNum
																		.intermediateLine
																	this.form.num_ = parseInt(num_.bdxNum.num) + 1
																} else {
																	this.bxname_ = num_.bdxNum.goDownTheRoadNum + ' - ' + num_.bdxNum
																		.intermediateLine + ' - '
																	this.form.num_ = 1
																}
															} else {
																if (num_.bdxNum.num != 0) {
																	this.bxname_ = num_.bdxNum.goDownTheRoadNum + " - "
																	this.form.num_ = parseInt(num_.bdxNum.num) + 1
																} else {
																	this.bxname_ = num_.bdxNum.goDownTheRoadNum + ' - '
																	this.form.num_ = 1
																}
															}
														} else {
															if (!this.initValue_bx_xlbh) {
																this.bxname_ = ""
																this.form.num_ = ""
															} else {
																this.bxname_ = this.initValue_bx_xlbh + ' - '
																this.form.num_ = 1
															}
														}

														this.$forceUpdate()
														this.current1 = 0
														this.open_map()
														this.form.isshow_close = false
														this.isshowstop = true
													})

												}
											})
										} else {
											this.form.state = 0
											setTimeout(res => {
												// 我是带入关联杆塔
												this.initValue_gt = num_.bdxNum.collectNum == null ? this.gt_items[0].num : num_
													.bdxNum.collectNum
												this.form.state = 1
											})
											if (num_.bdxNum.intermediateLine != 0) {
												this.current_zx_bx = 1
											} else {
												this.current_zx_bx = 0
											}
											if (num_.bdxNum.goDownTheRoadNum != 0 && num_.bdxNum.goDownTheRoadNum != null) {
												this.initValue_bx_xlbh = num_.bdxNum.goDownTheRoadNum
												this.form.intermediateLine = num_.bdxNum.intermediateLine
												if (num_.bdxNum.intermediateLine != 0) {
													this.current_zx_bx = 1
													if (num_.bdxNum.num != 0) {
														this.bxname_ = num_.bdxNum.goDownTheRoadNum + ' - ' + num_.bdxNum
															.intermediateLine + ' - '
														this.gl_bxnum = num_.bdxNum.goDownTheRoadNum + ' - ' + num_.bdxNum
															.intermediateLine
														this.form.num_ = parseInt(num_.bdxNum.num) + 1
													} else {
														this.bxname_ = num_.bdxNum.goDownTheRoadNum + ' - ' + num_.bdxNum
															.intermediateLine + ' - '
														this.form.num_ = 1
													}
												} else {
													if (num_.bdxNum.num != 0) {
														this.bxname_ = num_.bdxNum.goDownTheRoadNum + " - "
														this.form.num_ = parseInt(num_.bdxNum.num) + 1
													} else {
														this.bxname_ = num_.bdxNum.goDownTheRoadNum + ' - '
														this.form.num_ = 1
													}
												}
											} else {
												if (!this.initValue_bx_xlbh) {
													this.bxname_ = ""
													this.form.num_ = ""
												} else {
													this.bxname_ = this.initValue_bx_xlbh + ' - '
													this.form.num_ = 1
												}
											}
											this.$forceUpdate()
											this.current1 = 1
											this.open_map()
											this.form.isshow_close = false
											this.isshowstop = true
										}

									})

								} else {
									uni.showToast({
										title: resons.msg,
										icon: 'none'
									})
								}
							})
						}
					})
					return
				}

				if (e.coordinateGpsVO.pointType == 4) {
					util.myrequest(
						api.apis.gpscoordinatecollectInfo + e.coordinateGpsVO.id, {},
						"GET"
					).then(res => {
						this.current = 1
						this.form = res.gpsCoordinateCollect
						this.getRegionalList().then(res => {
							if (this.list.length == []) {
								return
							} else {
								this.initValue = this.list[0].value
							}
						})
						this.form.isshow_close = false
						// 我是处理图片的
						this.form.images = []
						for (let key in this.form) {
							if (key.indexOf("ur") == 0 && this.form[key] != "" && this.form[key] != null) {
								console.log(this.form[key])
								this.form.images.push(this.form[key])
							}
						}
						this.form.num = index
						this.linenamexj = ""
						// 我是判断同杆操作的
						this.ifSamePole().then(res => {
							let line_list = []
							if (res.mainLines.length == 0 || res.mainLines[0] == this.form.linename) {
								this.open_map()
								this.current = 1
								this.isshowstop = true
								return
							}
							this.current = 0
							res.mainLines.map((res, index) => {
								if (res != this.form.linename) {
									this.linenamexj += res
								}
								let linename_obj = this.items.filter(reson => {
									if (reson.linename == res) {
										return reson
									}
								})
								var obj = {
									id: linename_obj[0].id,
									images: [],
									linename: linename_obj[0].linename,
									name: linename_obj[0].linename,
								}
								this.getnum(obj.id).then(resnum => {
									obj.num = resnum.num
									if (obj.name != this.form.linename) {
										this.line_list.push(obj)
									} else {
										this.isshowstop = true
										this.open_map()
									}
								})

							})

						}).catch(rej => {
							this.open_map()
							this.isshowstop = true

						})
						this.isshowstop = true
						this.open_map()
					})
					// 我是创建环网站
				} else if (e.coordinateGpsVO.pointType == 1) {
					util.myrequest(
						api.apis.gpscoordinatehwzinfo + e.coordinateGpsVO.id, {},
						"GET"
					).then(res => {
						this.form = res.gpsCoordinateHwz
						this.getRegionalList().then(res => {
							if (this.list.length == []) {
								return
							} else {
								// 我是处理图片的
								this.initValue = this.list[0].value
							}
						})
						this.form.images = []
						this.current1 = res.gpsCoordinateHwz.regionalId == null || "" ? 1 : 0
						this.form.num = index
						this.open_map()
						this.form.isshow_close = false
						this.isshowstop = true
					})
				}
				// 我是箱变详情
				if (e.coordinateGpsVO.pointType == 3) {
					util.myrequest(
						api.apis.gpscoordinatexbinfo + e.coordinateGpsVO.id, {},
						"GET"
					).then(res => {
						this.form = res.gpsCoordinateXb
						this.getRegionalList().then(res => {
							if (this.list.length == []) {
								return
							} else {
								this.initValue = this.list[0].value
							}
						})
						this.current1 = res.gpsCoordinateXb.regionalId == null || "" ? 1 : 0
						// 我是处理图片的
						this.form.images = []
						this.open_map()
						this.form.isshow_close = false
						this.isshowstop = true
					})
				}
				// 我是创建电缆井
				if (e.coordinateGpsVO.pointType == 5) {
					util.myrequest(
						api.apis.gpscoordinatedljInfo + e.coordinateGpsVO.id, {},
						"GET"
					).then(res => {
						this.form = res.gpsCoordinateDlj
						this.getRegionalList().then(res => {
							if (this.list.length == []) {
								return
							} else {
								this.initValue = this.list[0].value
							}
						})
						this.current_dtj = 1
						if (this.form.dljType == null) {
							this.form.dljType = 1
						}
						// 我是处理图片的
						this.form.images = []
						this.form.dtjd_list = []
						this.form.dtjd_fild_list = []
						this.form.dtjx_list = []
						this.form.dtjx_fild_list = []
						this.form.dtjn_list = []
						this.form.dtjn_fild_list = []
						this.form.dtjb_list = []
						this.form.dtjb_fild_list = []
						this.form.dtjf_list = []
						this.form.dtjf_fild_list = []
						this.form.dtjj_list = []
						this.form.dtjj_fild_list = []
						this.form.dtjq_list = []
						this.form.dtjq_fild_list = []
						this.form.isshow_close = false
						this.getdljNum().then(res => {
							this.form.num = res.num
							this.isshowstop = true
						})
						this.open_map()
						this.form.isshow_close = false
						this.isshowstop = true
					})
				}
				// 我是创建配电室
				if (e.coordinateGpsVO.pointType == 2) {
					util.myrequest(
						api.apis.gpscoordinatepdsinfo + e.coordinateGpsVO.id, {},
						"GET"
					).then(res => {
						this.form = res.gpsCoordinatePds
						this.getRegionalList().then(res => {
							if (this.list.length == []) {
								return
							} else {
								this.initValue = this.list[0].value
							}
						})
						this.current1 = res.gpsCoordinatePds.regionalId == null || "" ? 1 : 0
						// 我是处理图片的
						this.form.images = []
						this.form.isshow_close = false
						this.form.num = index
						this.isshowstop = true
					})
				}
			},
			choose_type_canls() {
				this.issshow_choose_type = false
				this.isshowstop=false
				this.close_map()
			},
			// 我是变更选择类型
			choose_type(e) {
				this.check_ = e
			},
			// 电缆井修改
			gpscoordinatedljup() {
				console.log('新增电缆井')
				if (!this.form.num) {
					return uni.showToast({
						title: "请输入电缆井序号",
						icon: "none"
					})
				}
				// 新加数字类型判断
				var numReg = /^[0-9]*$/
				var numRe = new RegExp(numReg)
				if (!numRe.test(this.form.num)) {
					return uni.showToast({
						title: "电缆井序号请输入数字",
						icon: "none"
					})
				}
				let data = {
					id: this.form.id,
					dljName: this.form.dljName,
					dljType: this.form.dljType,
					linenameId: this.form.linenameId,
					num: this.form.num
				}
				util.myrequest(
					api.apis.gpscoordinatedlj,
					data,
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "操作成功",
							icon: "none"
						})
						this.isshowstop = false
						console.log(this.line_id)
						uni.$emit('getLoact_map', {
							id: this.line_id,
							gh: "false"
						})
						this.close_map()
					} else {
						return uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}
				})
			},
			// 我是环网站更新
			gpscoordinatehwzup() {
				if (this.form.hwzName == "" || this.form.hwzName == null) {
					return uni.showToast({
						title: "名称不能为空",
						icon: "none"
					})
				}
				let data = {
					id: this.form.id,
					hwzName: this.form.hwzName,
					vehicleId: this.form.vehicleId,
					deviceCode: this.form.deviceCode,
					dataDate: this.form.dataDate,
					lng: this.form.lng,
					createName: this.form.createName,
					lat: this.form.lat,
					gpsLng: this.form.gpsLng,
					gpsLat: this.form.gpsLat,
					linenameId: this.form.linenameId,
					mainLineArray: this.form.line_hwz_list,
					sftgdy: this.current == 1 ? 0 : 1,
					lineType: this.current1 == 1 ? 0 : 1,
					regionalId: this.form.regionalId || ""
				}
				if (data.sftgdy == 0) {
					delete data.mainLineArray
				}
				if (data.sftgdy == 1 || this.current1 == 1) {
					delete data.regionalId
				}
				console.log(data)
				util.myrequest(
					api.apis.gpscoordinatehwz,
					data,
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "修改成功",
							icon: "none"
						})
						this.linenamehwz = ""
						this.form.line_hwz_list = []
						this.iscanls = true
						this.isshowstop = false
						uni.$emit('getLoact_map', {
							id: this.line_id,
							gh: "false"
						})
						this.close_map()
					} else {
						return uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}

				}).catch(rej => {
					console.log(rej)
				})
			},
			// 我是配电室修改
			gpscoordinatepdsinfoup() {
				console.log(this.form.pdsName)
				if (this.form.pdsName == "" || this.form.pdsName == null) {
					return uni.showToast({
						title: "名称不能为空",
						icon: "none"
					})
				}
				let data = {
					id: this.form.id,
					pdsName: this.form.pdsName,
					linenameId: this.form.linenameId,
					lineType: this.current1 == 1 ? 0 : 1,
					regionalId: this.form.regionalId || ""
				}
				console.log(data)
				util.myrequest(
					api.apis.gpscoordinatepdsupdate,
					data,
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "修改成功",
							icon: "none"
						})
						this.isshowstop = false
						uni.$emit('getLoact_map', {
							id: this.line_id,
							gh: "false"
						})
						this.close_map()
					} else {
						console.log("我进来了")
						return uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}
				})
			},
			// 我是箱变更改
			gpscoordinatexbupdateup() {
				console.log(this.form.xbName)
				if (this.form.xbName == "" || this.form.xbName == null) {
					return uni.showToast({
						title: "箱变名称不能为空",
						icon: "none"
					})
				}
				let data = {
					id: this.form.id,
					xbName: this.form.xbName,
					linenameId: this.form.linenameId,
					lineType: this.current1 == 1 ? 0 : 1,
					regionalId: this.form.regionalId || ""
				}
				console.log(data)
				util.myrequest(
					api.apis.gpscoordinatexbupdate,
					data,
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "修改成功",
							icon: "none"
						})
						uni.$emit('getLoact_map', {
							id: this.line_id,
							gh: "false"
						})
						this.isshowstop = false
						this.close_map()
					} else {
						console.log("我进来了")
						return uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}
				})
			},
			// 我是表箱修改
			gpscoordinatebxup() {
				if (this.initValue_gt == "") {
					return uni.showToast({
						title: "杆塔关联不能为空",
						icon: "none"
					})
				}
				// console.log(this.form.qtNum,this.check_bx_type_index)
				// if(this.form.dbxType == 2 && !this.form.qtNum ){
				//     return uni.showToast({
				//         title:"墙铁数量不能为空",
				//         icon:"none"
				//     })
				// }
				if (this.initValue_bx_xlbh == "") {
					return uni.showToast({
						title: "表箱下路编号不能为空",
						icon: "none"
					})
				}
				if (this.form.num_ == "") {
					return uni.showToast({
						title: "编号不能为空",
						icon: "none"
					})
				}

				let gt_id = this.gt_items.filter(res => {
					return res.num == this.initValue_gt
				})[0].id
				console.log(gt_id)
				let data = {
					id: this.form.id,
					lineType: this.current1 == 1 ? 0 : 1,
					mainCollectId: gt_id || this.form.mainCollectId,
					num: this.form.num_,
					linenameId: this.form.linenameId,
					goDownTheRoadNum: this.initValue_bx_xlbh,
					regionalDbx: this.current_zx_bx,
					regionalId: this.form.regionalId,
					regionalDbxId: this.form.regionalDbxId,
					powerSupplyMain: this.bxcurrent,
					powerSupplyMainType: this.check_bx + 1,
					powerSupplyMainName: this.form.powerSupplyMainName,
					intermediateLine: this.form.intermediateLine,
					remark: this.form.remark,
					dbxType: this.form.dbxType,
					qtNum: Number(this.form.qtNum),
					xiang: this.form.xiang,
				}
				if (data.regionalDbxId == null) {
					data.regionalDbxId = ""
				}
				if (data.regionalDbxId.length < 7 && data.intermediateLine != 0) {
					try {
						for (let i = 0; i < this.tree_arr.length; i++) {
							if (this.tree_arr[i].goDownTheRoadNum == data.goDownTheRoadNum) {
								let arr = this.tree_arr[i].intermediateLineDTOS[0].dbxNumDTOS
								let readid = arr.filter(res => {
									return res.num == data.intermediateLine
								})[0]
								data.regionalDbxId = readid.id
							}
						}
					} catch (e) {
						//TODO handle the exception
						data.regionalDbxId = ""
					}
				}
				if (data.regionalId == '' || data.regionalId == null) {
					delete data.regionalId
				}
				if (data.dbxType == 1) {
					delete data.qtNum
				} else {
					delete data.powerSupplyMainType
					delete data.powerSupplyMainName
					delete data.powerSupplyMain
				}
				if (this.current_zx_bx == 0) {
					delete data.regionalDbxId
				}
				if (this.bxcurrent == 0) {
					delete data.powerSupplyMainType
					delete data.powerSupplyMainName
				}
				console.log(data)
				util.myrequest(
					api.apis.gpscoordinatedbx,
					data,
					"POST"
				).then(res => {
					console.log(res)
					if (res.code == 0) {
						uni.showToast({
							title: "修改成功",
							icon: "none"
						})
						uni.$emit('getLoact_map', {
							id: this.line_id,
							gh: "false"
						})
						this.isshowstop = false
						this.close_map()
					} else {
						return uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}
				})
				return
			},
			// 我是更新塔杆
			update() {
				if (this.form.pointType == 6) {
					this.gpscoordinatebxup()
					return
				}
				if (this.form.pointType == 5) {
					this.gpscoordinatedljup()
					return
				}
				if (this.form.pointType == 1) {
					this.gpscoordinatehwzup()
					return
				}
				// 我是配电更改
				if (this.form.pointType == 2) {
					this.gpscoordinatepdsinfoup()
					return
				}
				// 我是箱变更改
				if (this.form.pointType == 3) {
					this.gpscoordinatexbupdateup()
					return
				}
				var date = new Date()
				this.form.mainLineMap = {}
				this.line_list.map(res => {
					this.form.mainLineMap[res.id] = {}
				})

				for (let key in this.form.mainLineMap) {
					for (var i = 0; i < this.line_list.length; i++) {
						if (key == this.line_list[i].id) {
							console.log(this.line_list[i])
							this.form.mainLineMap[key].num = this.line_list[i].num
							this.form.mainLineMap[key].linenameId = this.line_list[i].id
							this.form.mainLineMap[key].id = this.line_list[i].id_
							for (var k = 0; k < 20; k++) {
								let str = "url" + (k < 9 ? "0" + (k + 1) : k + 1)
								this.form.mainLineMap[key][str] = this.line_list[i].images[k] ? this.line_list[i].images[k] : ""
							}
						}
					}
				}
				// 我是处理this.form图片属性
				let obj_ur = {}
				for (var k = 0; k < 20; k++) {
					let str = "url" + (k < 9 ? "0" + (k + 1) : k + 1)
					obj_ur[str] = this.form.images[k] ? this.form.images[k] : ""
				}

				let arr = this.line_list
				this.mainLines = ""
				arr.forEach(res => {
					this.mainLines += res.id + ","
				})
				this.mainLines = this.mainLines + this.form.linenameId
				if (this.current1 == 0) {
					this.form.mainLineMap = null
				}
				// if(this.form.num == 0){
				//     return uni.showToast({
				//         title:"塔杆序号不能为空",
				//         icon:"none"
				//     })
				// }
				if(this.form.num){
					// 新加数字类型判断
					var numReg = /^[0-9]*$/
					var numRe = new RegExp(numReg)
					if (!numRe.test(this.form.num)) {
						return uni.showToast({
							title: "电缆井序号请输入数字",
							icon: "none"
						})
					}
				}

				let data = {
					...obj_ur,
					id: this.form.id,
					num: this.form.num,
					linenameId: this.form.linenameId,
					linename: this.form.linename,
					regionalId: this.current1 === 1 ? "" : this.form.regionalId,
					regionalName: this.form.regionalName || "",
					lineType: this.current1 === 1 ? 0 : 1,
					mainLines: this.current == 0 ? this.mainLines : "",
					mainLineIds: this.form.mainLineIds || "",
					mainLineStringArray: this.mainLines + "",
					pointType: this.form.pointType,
					// 1是否
					sftgdy: this.current == 1 ? 0 : 1,
					createName: uni.getStorageSync("username"),
					createTime: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`,
					ransformerName: this.form.ransformerName,
					associatedLever: this.form.associatedLever,
					updateTime: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`,
					mainLineMap: this.form.mainLineMap == null || "" ? null : this.form.mainLineMap
				}

				if (this.current1 === 1) {
					delete data.regionalId
					delete data.regionalName
				}
				if (this.current == 1) {
					delete data.mainLineStringArray
				}
				console.log(data)
				util.myrequest(
					api.apis.appUpdate,
					data,
					"POST"
				).then(res => {
					if (res.code == 0) {
						this.getRegionalList()
						uni.showToast({
							title: "修改成功",
							icon: "none"
						})
						uni.$emit('getLoact_map', {
							id: this.line_id,
							gh: "false"
						})
						this.isshowstop = false
						this.close_map()
					} else {
						uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}
				})
			},
			// 我是删除电缆井
			gpscoordinatedljdelete() {
				util.myrequest(
					api.apis.gpscoordinatedljdelete + this.form.id, {},
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "删除成功",
							icon: "none"
						})
						setTimeout(res => {
							this.isshowstop = false
							uni.$emit('getLoact_map', {
								id: this.line_id
							})
							this.close_map()

						}, 500)
					}
				})
			},
			// 我是塔杆删除
			tgdeletes() {
				util.myrequest(
					api.apis.deletes + this.form.id, {},
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "删除成功",
							icon: "none"
						})
						setTimeout(res => {
							this.isshowstop = false
							uni.$emit('getLoact_map', {
								id: this.line_id
							})
							this.close_map()
						}, 500)
					} else {
						console.log(this.form)
						console.log(this.current)
						return uni.showToast({
							title: res.msg,
							icon: "none"
						})

					}

				})
			},
			// 我是环网站删除
			gpscoordinatehwzdelete() {
				util.myrequest(
					api.apis.gpscoordinatehwzdelete + this.form.id, {},
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "删除成功",
							icon: "none"
						})
						this.linenamehwz = ""
						this.form.line_hwz_list = []
						setTimeout(res => {
							this.isshowstop = false
							this.close_map()
							uni.$emit('getLoact_map', {
								id: this.line_id
							})
						}, 500)
					}
				})
			},
			// 我是配电室删除
			gpscoordinatepdsdelete() {
				util.myrequest(
					api.apis.gpscoordinatepdsdelete + this.form.id, {},
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "删除成功",
							icon: "none"
						})
						setTimeout(res => {
							this.isshowstop = false
							this.close_map()
							uni.$emit('getLoact_map', {
								id: this.line_id
							})
						}, 500)
					}
				})
			},
			// 我是箱变删除
			gpscoordinatexbdelete() {
				util.myrequest(
					api.apis.gpscoordinatexbdelete + this.form.id, {},
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "删除成功",
							icon: "none"
						})
						setTimeout(res => {
							this.isshowstop = false
							this.close_map()
							uni.$emit('getLoact_map', {
								id: this.line_id
							})
						}, 500)
					}
				})
			},
			// 我是表箱删除
			gpscoordinatebxdelete() {
				util.myrequest(
					api.apis.gpscoordinatedbxappDelete + this.form.id, {},
					"POST"
				).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: "删除成功",
							icon: "none"
						})
						setTimeout(res => {
							this.isshowstop = false
							this.close_map()
							uni.$emit('getLoact_map', {
								id: this.line_id
							})
						}, 500)
					}
				})
				return
			},
			// 我是删除点位
			dellat(e) {
				let pointType = this.form.pointType
				uni.showModal({
					title: '提示',
					content: '是否删除点位',
					showCancel: true, // 是否显示取消按钮，默认为 true
					confirmColor: '#f55850',
					cancelColor: '#39B54A',
					success: (res) => {
						if (res.confirm) {
							// this.current = 0
							if (pointType == 6) {
								// 电缆井删除
								this.gpscoordinatebxdelete()
								return
							}
							if (pointType == 5) {
								// 电缆井删除
								this.gpscoordinatedljdelete()
								return
							}
							if (pointType == 4) {
								this.tgdeletes()
								return
							}
							if (pointType == 1) {
								this.gpscoordinatehwzdelete()
								return
							}
							if (pointType == 2) {
								this.gpscoordinatepdsdelete()
								return
							}
							if (pointType == 3) {
								this.gpscoordinatexbdelete()
								return
							}
							//点击了确定
						} else {
							console.log("我点了取消")
							//点击了取消
						}
					}
				})


			},
			// 我是支线下拉框
			visibleChange(isShow) { // 列表框的显示隐藏事件
				console.log('isShow::', isShow);
			},
			change({
				newVal,
				oldVal,
				index,
				orignItem
			}) {
				if (this.form.pointType != 6) {
					this.form.regionalId = orignItem.id
					this.getzxnum(this.form.regionalId).then(res => {
						this.form.num = res.num
					})
					this.form.regionalName = ""
				}
				console.log({
					newVal,
					oldVal,
					index,
					orignItem
				})
				if (this.form.pointType == 6) {
					this.form.regionalId = orignItem.id
					this.getCollectList(orignItem.id).then((resons, rej) => {
						this.form.tg_list = []
						this.gt_items = resons.nums
						let arr = []
						console.log(resons.nums)
						resons.nums.forEach(tg_num => {
							arr.push(tg_num.num)
						})
						this.form.tg_list = arr
						console.log(this.form.tg_list)
						console.log(this.gt_items)
						if (this.gt_items.length == 0) {
							this.form.state_ = 0
							this.form.state_gt = 0
							this.initValue_bx_xlbh_ = false
							setTimeout(res => {
								this.initValue_gt = ""
								this.initValue_bx_xlbh = ""
								this.bxname_ = ""
								this.form.tg_list = []
								this.form.state_ = 1
								this.initValue_bx_xlbh_ = true
							}, 0)

							this.form.tg_list = []
							uni.showToast({
								title: "该线路并无塔杆",
								icon: "none",
							})
							return
						} else {
							console.log("我进来了")
							console.log(this.form.tg_list)
							// this.form.state_ = 0
							// setTimeout(res=>{
							//    console.log(this.form.tg_list,1111111)
							//    this.initValue_gt = this.form.tg_list[0]
							//    console.log(this.initValue_gt)
							//    this.form.state_ = 1 
							// },0)
						}
						console.log("我到了")

						let gt_id = this.gt_items.filter(res => {
							return res.num == String(this.initValue_gt) || this.form.tg_list[0]
						})[0].id
						console.log(gt_id)
						console.log(this.initValue_bx_xlbh, "", gt_id)
						this.getBdxNum(this.initValue_bx_xlbh, "", gt_id).then(res => {
							console.log(res)
							if (res.code == 0) {
								let data = res.bdxNum
								if (data.intermediateLine != 0) {
									this.current_zx_bx = 1
									this.gl_bxnum = data.goDownTheRoadNum + " - " + res.bdxNum.intermediateLine
									this.form.intermediateLine = data.intermediateLine
								} else {
									this.current_zx_bx = 0
								}
								// 我正在改
								if (data.goDownTheRoadNum == 0) {
									if (this.initValue_bx_xlbh == "") {
										this.bxname_ = ""
									} else {
										this.bxname_ = this.initValue_bx_xlbh + " - "
										this.form.num_ = 1
									}
								} else {
									this.initValue_bx_xlbh_ = false
									this.form.state_ = 0
									setTimeout(res => {
										this.initValue_bx_xlbh = data.goDownTheRoadNum
										this.initValue_gt = data.collectNum
										this.initValue_bx_xlbh_ = true
										this.form.state_ = 1
									}, 0)
									this.bxname_ = data.goDownTheRoadNum + " - " + (res.bdxNum.intermediateLine == 0 ? '' : res
										.bdxNum.intermediateLine + '-')
									this.form.num_ = parseInt(res.bdxNum.num) + 1
									this.$forceUpdate()
								}
							}
						})
						this.$forceUpdate()
					})
					this.$forceUpdate()
					return
				}
			},
			change_gt_gl({
				newVal,
				oldVal,
				index,
				orignItem
			}) {
				console.log({
					newVal,
					oldVal,
					index,
					orignItem
				})
				let gt_id = this.gt_items.filter(res => {
					return res.num == newVal
				})[0].id
				console.log(this.initValue_bx_xlbh)
				this.getBdxNum(this.initValue_bx_xlbh == "" ? "" : this.initValue_bx_xlbh, "", gt_id || "").then(res => {
					console.log(res)
					if (res.code == 0) {
						// 我在修改
						let data = res.bdxNum
						if (data.intermediateLine != 0) {
							this.current_zx_bx = 1
							this.gl_bxnum = data.goDownTheRoadNum + " - " + res.bdxNum.intermediateLine
							this.form.intermediateLine = data.intermediateLine
						} else {
							this.current_zx_bx = 0
						}
						// 我正在改
						if (data.goDownTheRoadNum == 0 || data.goDownTheRoadNum == null) {
							console.log(this.initValue_bx_xlbh)
							if (this.initValue_bx_xlbh == "") {
								this.bxname_ = ""
							} else {
								this.bxname_ = this.initValue_bx_xlbh + " - "
								this.form.num_ = 1
								console.log(this.form.num_)
								this.$forceUpdate()
							}
						} else {
							this.initValue_bx_xlbh_ = false
							setTimeout(res => {
								this.initValue_bx_xlbh = data.goDownTheRoadNum
								this.initValue_bx_xlbh_ = true
							})

							this.bxname_ = data.goDownTheRoadNum + " - " + (res.bdxNum.intermediateLine == 0 ? '' : res.bdxNum
								.intermediateLine + '-')
							this.form.num_ = parseInt(res.bdxNum.num) + 1
							this.$forceUpdate()
						}
					}
				})
				this.initValue_gt = newVal
				// this.form.
			},

			change_bx_({
				newVal,
				oldVal,
				index,
				orignItem
			}) {
				let gt_id = this.gt_items.filter(res => {
					return res.num == this.initValue_gt
				})[0].id
				console.log({
					newVal,
					oldVal,
					index,
					orignItem
				})
				this.getBdxNum(newVal, "", gt_id).then(res => {
					console.log(res)
					if (res.bdxNum.intermediateLine != 0) {
						this.current_zx_bx = 1
						this.gl_bxnum = res.bdxNum.goDownTheRoadNum + " - " + res.bdxNum.intermediateLine
						this.form.intermediateLine = res.bdxNum.intermediateLine
					} else {
						this.current_zx_bx = 0
					}
					// 我正在改
					if (res.bdxNum.goDownTheRoadNum == 0) {
						this.initValue_bx_xlbh = newVal
						this.bxname_ = newVal + '-'
						this.form.num_ = 1
					} else {
						this.initValue_bx_xlbh = res.bdxNum.goDownTheRoadNum
						this.bxname_ = res.bdxNum.goDownTheRoadNum + " - " + (res.bdxNum.intermediateLine == 0 ? '' : res.bdxNum
							.intermediateLine + '-')
						this.form.num_ = parseInt(res.bdxNum.num) + 1
						this.$forceUpdate()
					}

				})

				this.gl_bxnum = ""
				this.form.intermediateLine = 0
			},
			// 我是多选数据
			showPopup() {
				this.memberList = this.memberList.filter(res => {
					return res.linename != this.form.linename
				})
				if (this.linenamexj == "") {
					this.iscanls = true
					this.$refs.popup.open();
					return
				}
				this.$refs.popup.open();
			},
			// 我是环网站多选数据
			showPopup1() {
				this.memberList = this.memberList.filter(res => {
					return res.linename != this.form.linename
				})
				if (this.linenamehwz == "") {
					this.iscanls = true
					this.$refs.popup1.open();
					return
				} else {
					this.iscanls = false
				}
				this.$refs.popup1.open();
			},
			cancelFun() {
				this.$refs.popup.close();
			},
			cancelFun1() {
				this.$refs.popup1.close();
			},
			// 我是环网站的确认
			memberChange1(callBackObj) {
				console.log(callBackObj)
				if (callBackObj == "我没选") {
					this.form.line_hwz_list = []
					this.linenamehwz = ""
					this.cancelFun1();
					this.$forceUpdate()
					return
				}
				if (callBackObj.selectedList.length > 2) {
					uni.showToast({
						title: "最多只能选择两条主线",
						icon: 'none'
					})
					return
				}
				let arr = callBackObj.selectedList
				let hwzarr = []
				let str = ""
				arr.map(res => {
					str += res.linename + " ",
						hwzarr.push(Number(res.id))
				})
				hwzarr.push(Number(this.form.linenameId))
				this.linenamehwz = str
				this.form.line_hwz_list = hwzarr
				this.cancelFun1()
			},
			//多选确认后
			memberChange(callBackObj) {
				this.iscanls = false
				if (callBackObj == "我没选") {
					let str = ""
					let mainLines = ""
					let line_list = []
					let mainLineArray = []
					let mainLineStringArray = []
					let mainLineIds = []
					mainLineArray.push(this.form.linenameId)
					mainLineStringArray.push(this.form.linenameId)
					this.form.mainLineArray = mainLineArray
					this.form.mainLineStringArray = mainLineStringArray
					this.line_list = line_list
					this.linenamexj = ""
					this.cancelFun();
					this.$forceUpdate()
					return
				}
				if (callBackObj.selectedList.length > 2) {
					uni.showToast({
						title: "最多只能选择两条同杆主线",
						icon: 'none'
					})
					return
				}
				let arr = callBackObj.selectedList
				console.log(arr)
				let str = ""
				let mainLines = ""
				let line_list = []
				let mainLineArray = []
				let mainLineStringArray = []
				let mainLineIds = []
				arr.map(res => {
					str += res.linename + " ",
						line_list.push(res)
					mainLineArray.push(res.id)
					mainLineStringArray.push(res.id)
					mainLines += res.id + ","
				})
				var that = this
				mainLineArray.push(this.form.linenameId)
				mainLineStringArray.push(this.form.linenameId)
				this.form.mainLineArray = mainLineArray
				this.form.mainLineStringArray = mainLineStringArray
				this.line_list = line_list
				mainLines += this.form.linenameId
				this.linenamexj = str
				this.form.mainLines = mainLines
				line_list.map((res, index) => {
					this.getnum(res.id).then(reson => {
						this.line_list[index].num = reson.num
						if (index == line_list.length - 1) {
							that.cancelFun();
							that.$forceUpdate()
						}
					})
					res.images = []
				})
			},
			// 我是多选数据结束

			// 我是点击线路
			toshowline(e) {
				if (this.choose_linenameId === true) {
					this.form.linename = e.linename
					this.form.linenameId = e.id
					this.choose_linenameId = false
					this.isshow = false
					return
				}
				uni.$emit("getLoact", {
					name: e.linename,
				})
				uni.$emit("getLoact_map", {
					name: e.linename,
					id: e.id,
					gh: "true"
				})
				this.line = e.linename
				this.line_id = e.id
				this.getgpsall()
				this.isshow = false
				this.close_map()
			},
			// 请求直线
			getRegionalList1() {
				return new Promise((ress, rej) => {
					let line_id = this.form.linenameId ? this.form.linenameId : this.line_id
					console.log(api.apis.getRegionalList + line_id)
					util.myrequest(
						api.apis.getRegionalList + line_id, {},
						"GET"
					).then(res => {
						ress(res)
					})
				})

			},

			// 查询支线
			getRegionalList() {
				return new Promise((ress, rej) => {
					let line_id = this.form.linenameId ? this.form.linenameId : this.line_id
					util.myrequest(
						api.apis.getRegionalList + line_id, {},
						"GET"
					).then(res => {
						this.list = res.regionalEntities.map(res => {
							let obj = {
								value: res.regionalName,
								id: res.id,
								lineid: res.lineId
							}
							return obj
						})
						if (res.regionalEntities.length == this.list.length) {
							ress("我进来了")
						}
					})
				})

			},
			// 我是搜索
			searchline() {
				util.myrequest(
					api.apis.gpscoordinateline, {},
					"POST"
				).then(res => {
					this.items = res.list.filter(res => {
						return res.linename.indexOf(this.seach_line) != -1
					})
					this.items.unshift({
						linename: "全部",
						id: ""
					})
				})
			},

			// 获取所有线路
			getgpsall() {
				util.myrequest(
					api.apis.gpscoordinateline, {},
					"POST"
				).then(res => {
					// 线路查询结果拼接
					if (this.items.length < res.list.length) {
						this.items = this.items.concat(res.list)
					}
					this.memberList = res.list
					this.memberList.map(res => {
						res.name = res.linename
					})
					// 默认值
					if(this.line_id==''||!this.line_id){
						this.line_id = res.list[0].id
						this.line = res.list[0].linename
					}
			

					// 查选中主线对应支线列表
					this.getRegionalList()
				})
			},
			// 我是单选框
			radioChange_dtj: function(evt) {
				for (let i = 0; i < this.items.length; i++) {
					if (this.items_radio_dtjtype[i].value === evt.detail.value) {
						this.current_dtj = i;
						break;
					}
				}
				this.form.dljType = this.current_dtj + 1
			},
			radioChange: function(evt) {
				for (let i = 0; i < this.items.length; i++) {
					if (this.items_radio[i].value === evt.detail.value) {
						this.current = i;
						break;
					}
				}
			},
			// 我是表箱选择
			radioChangebx_tg(evt) {
				console.log(evt.detail.value)
				if (evt.detail.value == "false") {
					this.bxcurrent = 0
				} else {
					this.bxcurrent = 1
				}
			},
			radioChangetg: function(evt) {
				console.log(evt.detail.value)
				if (evt.detail.value == "false") {
					console.log("我进来了")
					this.current = 1
					this.linenamehwz = ""
					this.line_list = []
					this.form.mainLineArray = []
					this.linenamexj = ""
				} else {
					this.current = 0
				}

			},
			radioChangezx_bx(evt) {
				if (evt.detail.value == "false") {
					this.gl_bxnum = ""
					this.current_zx_bx = 0
					console.log(this.gt_items)
					let gt_id = this.gt_items.filter(res => {
						return res.num == String(this.initValue_gt)
					})[0].id
					console.log(gt_id)
					this.getBdxNum(this.initValue_bx_xlbh, "0", gt_id).then(res => {
						console.log(res)

						if (res.code == 0) {
							this.form.intermediateLine = "0"
							let data = res.bdxNum
							if (data.intermediateLine != 0) {
								this.current_zx_bx = 1
								this.gl_bxnum = data.goDownTheRoadNum + " - " + res.bdxNum.intermediateLine
								this.form.intermediateLine = data.intermediateLine
							} else {
								this.current_zx_bx = 0
							}
							// 我正在改
							if (data.goDownTheRoadNum == 0) {
								this.bxname_ = this.initValue_bx_xlbh + " - "
								this.form.num_ = 1
							} else {
								this.initValue_bx_xlbh = data.goDownTheRoadNum
								this.bxname_ = data.goDownTheRoadNum + " - " + (res.bdxNum.intermediateLine == 0 ? '' : res.bdxNum
									.intermediateLine + '-')
								this.form.num_ = parseInt(res.bdxNum.num) + 1
								this.$forceUpdate()
							}
						}
					})
				} else {
					this.gl_bxnum = ""
					this.current_zx_bx = 1
				}
			},
			radioChangezxg: function(evt) {
				if (evt.detail.value == "false") {
					if (this.form.pointType != 6) {
						this.current1 = 1
						this.current = 1
						this.getnum(this.form.linenameId).then(res => {
							this.form.num = res.num
							this.$forceUpdate()
						})
					}
					if (this.form.pointType == 6) {
						this.current1 = 1
						this.form.regionalId = ""
						this.getCollectList().then((resons, rej) => {

							console.log(resons)
							if (resons.nums.length == 0) {
								this.current1 = 0
								return uni.showToast({
									title: "该线路并无主线杆塔",
									icon: "none"
								})

							}
							let arr = []
							this.gt_items = resons.nums
							resons.nums.forEach(tg_num => {
								arr.push(tg_num.num)
							})
							this.form.tg_list = arr
							this.form.state_ = 0
							this.initValue_gt = this.gt_items[0].num
							if (this.initValue_gt.length == 0) {
								setTimeout(res => {
									this.gt_items = []
									this.form.state_ = 1
								})
								return uni.showToast({
									title: "该线路并无杆塔",
									icon: "none"
								})
							}
							let gt_id = this.gt_items.filter(res => {
								return res.num == String(this.initValue_gt)
							})[0].id
							console.log(gt_id)
							this.getBdxNum(this.initValue_bx_xlbh, "", gt_id).then(res => {
								if (res.bdxNum.intermediateLine != 0) {
									this.current_zx_bx = 1
									this.gl_bxnum = res.bdxNum.goDownTheRoadNum + " - " + res.bdxNum.intermediateLine
									this.form.intermediateLine = res.bdxNum.intermediateLine
								} else {
									this.current_zx_bx = 0
								}
								// 我正在改
								if (res.bdxNum.goDownTheRoadNum == 0) {
									this.bxname_ = this.initValue_bx_xlbh + '-'
									this.form.num_ = 1
									this.$forceUpdate()
								} else {
									console.log("我进来了")
									this.initValue_bx_xlbh_ = false
									this.initValue_bx_xlbh = res.bdxNum.goDownTheRoadNum
									setTimeout(res => {
										this.initValue_bx_xlbh_ = true
										console.log(this.initValue_bx_xlbh_)
									}, 0)

									this.bxname_ = res.bdxNum.goDownTheRoadNum + " - " + (res.bdxNum.intermediateLine == 0 ? '' :
										res.bdxNum.intermediateLine + '-')
									this.form.num_ = parseInt(res.bdxNum.num) + 1
									this.$forceUpdate()
								}
							})
							setTimeout(res => {
								this.form.state_ = 1
							}, 0)
							this.$forceUpdate()
						})

						return
					}
				} else {
					this.line_list = []
					this.linenamexj = ""
					if (this.list.length == []) {
						this.current1 = 0
						this.current = 1
						this.$forceUpdate()
						return
					}
					this.getzxnum(this.list[0].id).then(res => {
						this.initValue = this.list[0].value
						this.form.regionalId = this.list[0].id
						this.form.num = res.num
						this.current1 = 0
						this.current = 1
						this.$forceUpdate()
					})
					if (this.form.pointType == 6) {
						this.current1 = 0
						this.getCollectList(this.list[0].id).then((resons, rej) => {
							console.log(resons)
							if (resons.nums.length == 0) {
								this.current1 = 1
								return uni.showToast({
									title: "该线路并无支线杆塔",
									icon: "none"
								})

							}
							let arr = []
							this.gt_items = resons.nums
							console.log(this.gt_items)
							resons.nums.forEach(tg_num => {
								arr.push(tg_num.num)
							})
							this.form.tg_list = arr
							this.form.state_ = 0
							this.initValue_gt = this.gt_items[0].num || ""
							if (this.initValue_gt == "" || this.initValue_gt == undefined) {
								setTimeout(res => {
									// 我正在改
									this.form.state_ = 1
								}, 0)
							} else {
								let gt_id = this.gt_items.filter(res => {
									return res.num == String(this.initValue_gt)
								})[0].id
								this.getBdxNum(this.initValue_bx_xlbh, "", gt_id).then(res => {
									console.log(res)
									if (res.bdxNum.intermediateLine != 0) {
										this.current_zx_bx = 1
										this.gl_bxnum = res.bdxNum.goDownTheRoadNum + " - " + res.bdxNum.intermediateLine
										this.form.intermediateLine = res.bdxNum.intermediateLine
									} else {
										this.current_zx_bx = 0
									}
									// 我正在改
									if (res.bdxNum.goDownTheRoadNum == 0) {
										if (this.initValue_bx_xlbh == "") {
											this.bxname_ = ""
										} else {
											this.bxname_ = this.initValue_bx_xlbh + '-'
											this.form.num_ = 1
										}
										this.$forceUpdate()
									} else {
										this.initValue_bx_xlbh = res.bdxNum.goDownTheRoadNum
										this.bxname_ = res.bdxNum.goDownTheRoadNum + " - " + (res.bdxNum.intermediateLine == 0 ?
											'' : res.bdxNum.intermediateLine + '-')
										this.form.num_ = parseInt(res.bdxNum.num) + 1
										this.$forceUpdate()
									}
								})
								setTimeout(res => {
									// 我正在改
									this.form.state_ = 1
								}, 0)
							}

							this.$forceUpdate()
						})
						return
					}
				}
			},
			getdljNum() {
				return new Promise((reson, rej) => {
					util.myrequest(
						api.apis.getgpscoordinatedlj + this.form.linenameId, {

						},
						"GET"
					).then(res => {
						reson(res)
					})
				})

			},
			// 我是电梯井详情
			gpscoordinatedljInfo(id) {
				util.myrequest(
					api.apis.gpscoordinatedljInfo + id, {

					},
					"GET"
				).then(res => {
					if (res.code == 0) {
						this.form = res.gpsCoordinateDlj
						this.form.dtjd_list = []
						this.form.dtjd_fild_list = []
						this.form.dtjx_list = []
						this.form.dtjx_fild_list = []
						this.form.dtjn_list = []
						this.form.dtjn_fild_list = []
						this.form.dtjb_list = []
						this.form.dtjb_fild_list = []
						this.form.dtjf_list = []
						this.form.dtjf_fild_list = []
						this.form.dtjj_list = []
						this.form.dtjj_fild_list = []
						this.form.dtjq_list = []
						this.form.dtjq_fild_list = []
						this.form.gpsCoordinateFileEntities = this.form.gpsCoordinateFileEntities.map(res => {
							res.url = res.url.replace("//", "/")
							res.url = res.url.replace("opt/", "")
							res.url = "http://115.236.28.75:8088/" + res.url
							console.log(res)
							let obj = {
								fileId: res.fileId,
								dljType: res.dljType,
								url: res.url,
								visualAngle: res.visualAngle
							}
							return obj
						})
						if (this.form.num == "" || this.form.num == null) {
							this.getdljNum().then(res => {
								console.log(res)
								this.form.num = res.num
							})
						}
						this.form.gpsCoordinateFileEntities.map(res => {
							if (res.visualAngle === 1) {
								this.form.dtjd_list.push(res.url)
								this.form.dtjd_fild_list.push(res.fileId)
							}
							if (res.visualAngle == 2) {
								this.form.dtjx_list.push(res)
								this.form.dtjx_fild_list.push(res.fileId)
							}
							if (res.visualAngle == 3) {
								this.form.dtjn_list.push(res)
								this.form.dtjn_fild_list.push(res.fileId)
							}
							if (res.visualAngle == 4) {
								this.form.dtjb_list.push(res)
								this.form.dtjb_fild_list.push(res.fileId)
							}
							if (res.visualAngle == 5) {
								this.form.dtjf_list.push(res)
								this.form.dtjf_fild_list.push(res.fileId)
							}
							if (res.visualAngle == 6) {
								this.form.dtjj_list.push(res)
								this.form.dtjj_fild_list.push(res.fileId)
							}
							if (res.visualAngle == 9) {
								this.form.dtjq_list.push(res)
								this.form.dtjq_fild_list.push(res.fileId)
							}
						})
						this.open_map()
						this.form.isshow_close = true
						this.isshowstop = true
					}

				})
			},
			// 我是环网站详情
			gpscoordinatehwzinfo(id, e) {
				console.log(e)
				util.myrequest(
					api.apis.gpscoordinatehwzinfo + id, {
						// vehicleId:
					},
					"GET"
				).then(res => {
					if (res.code == 0) {
						this.form = res.gpsCoordinateHwz
						console.log(this.form)
						this.linenamehwz = []
						try {
							if (this.form.mainLineArray.length != 0 && this.form.mainLineArray != null && this.form.sftgdy != 0) {
								this.form.line_hwz_list = this.form.mainLineArray
								let newarr = this.form.mainLineArray.map(reson => {
									let getlinename = (id) => {
										let items = this.items.filter(ress => {
											return ress.id == reson && ress.id != res.gpsCoordinateHwz.linenaneId
										})
										return items[0].linename
									}
									return getlinename(reson)
								})
								console.log(newarr)
								for (var k = 0; k < newarr.length; k++) {
									if (this.form.linename == newarr[k]) {

									} else {
										this.linenamehwz += newarr[k] + " "
									}
								}
								this.current = 0
							} else {
								this.current = 1
								this.linenamehwz = ""
								this.form.line_hwz_list = []
							}
						} catch (e) {
							this.current = 1
							this.linenamehwz = ""
							this.form.line_hwz_list = []
						}

						if (this.linenamehwz != "") {
							this.iscanls = false
						}
						this.getRegionalList().then(res => {
							if (this.form.regionalId != null && this.form.regionalId != "" && this.form.lineType == 1) {
								this.current1 = 0
								let zxlist = this.list.filter(res => {
									return res.id == this.form.regionalId
								})
								this.form.regionalName = zxlist[0].value || ""
								console.log(this.form.regionalName)
								this.initValue = zxlist[0].value || ""
							} else {
								this.current1 = 1
							}
						})
						this.form.fild_list = []
						this.form.gpsCoordinateFileEntities = this.form.gpsCoordinateFileEntities.map(res => {
							res.url = res.url.replace("//", "/")
							res.url = res.url.replace("opt/", "")
							res.url = "http://115.236.28.75:8088/" + res.url
							this.form.fild_list.push(res.fileId)
							return res.url
						})
						this.open_map()
						this.form.isshow_close = true
						this.isshowstop = true
					}

				})
			},
			// 我是详情配电室
			gpscoordinatepdsinfo(id) {
				util.myrequest(
					api.apis.gpscoordinatepdsinfo + id, {

					},
					"GET"
				).then(res => {
					console.log(res)
					if (res.code == 0) {
						this.form = res.gpsCoordinatePds
						this.form.fild_list = []
						this.form.gpsCoordinateFileEntities = this.form.gpsCoordinateFileEntities.map(res => {
							res.url = res.url.replace("//", "/")
							res.url = res.url.replace("opt/", "")
							res.url = "http://115.236.28.75:8088/" + res.url
							this.form.fild_list.push(res.fileId)
							return res.url
						})
						// 判断支线
						if (this.form.regionalId != null && this.form.regionalId != "" && this.form.lineType == 1) {
							this.current1 = 0
							let zxlist = this.list.filter(res => {
								return res.id == this.form.regionalId
							})
							this.form.regionalName = zxlist[0].value || ""
							this.initValue = zxlist[0].value || ""
						} else {
							this.current1 = 1
						}
						this.open_map()
						this.form.isshow_close = true
						this.isshowstop = true
					}

				})
			},
			// 我是表箱详情
			gpscoordinatebxInfo(id) {
				console.log('表箱详情')
				util.myrequest(
					api.apis.gpscoordinatedbxInfo + id, {

					},
					"GET"
				).then(res => {
					console.log(res)
					if (res.code == 0) {
						this.form = res.gpsCoordinateDbx
						this.form.bx_tg_linename = ""
						this.check_bx = 1
						this.bxcurrent = 0
						this.form.state_ = 0
						this.bxcurrent = res.gpsCoordinateDbx.powerSupplyMain
						this.initValue_gt = this.form.mainCollectNum
						this.form.linename = this.items.filter(reson => {
							return reson.id == this.form.linenameId
						})[0].name
						if (this.form.lineType) {
							this.getRegionalList().then(reson => {
								if (this.list.length == []) {
									return
								} else {
									console.log(this.list)
									console.log("我进来了")
									console.log(this.form.regionalId)
									let red_id = this.list.filter(res => {
										return res.id == this.form.regionalId
									})[0]
									this.initValue = red_id.value
									console.log(this.initValue)
								}
							})
						}
						// 我是获取所有的杆塔
						this.getCollectList(this.form.regionalId || "").then(resons => {

							if (resons.code == 0) {
								if (resons.nums.length == 0) {

								}
								let arr = []
								this.gt_items = resons.nums
								resons.nums.forEach(tg_num => {
									arr.push(tg_num.num)
								})
								this.form.tg_list = arr
								this.current1 = this.form.lineType == 0 ? 1 : 0
								this.initValue_gt = this.form.mainCollectNum
								this.initValue_bx_xlbh = this.form.goDownTheRoadNum
								this.bxname_ = this.form.goDownTheRoadNum + ' - ' + (this.form.intermediateLine == 0 ? '' : this
									.form.intermediateLine + ' - ')
								console.log(this.form.num)
								this.form.num_ = this.form.num
								this.$forceUpdate()
								this.form.bx_tg_linename = this.form.powerSupplyMainName
								this.check_bx = this.form.powerSupplyMainType - 1
								if (this.form.intermediateLine == 0) {
									this.current_zx_bx = 0
									this.gl_bxnum = ""
								} else {
									this.current_zx_bx = 1
									this.gl_bxnum = this.form.goDownTheRoadNum + "-" + this.form.intermediateLine
								}
								if (this.form.intermediateLine != 0) {
									this.current_zx_bx = 1
									this.gl_bxnum = this.form.goDownTheRoadNum + ' - ' + (data_zx_.intermediateLine == 0 ? '' :
										data_zx_.intermediateLine + '-')
								} else {
									this.current_zx_bx = 0
								}
								this.$forceUpdate()
								this.open_map()
								this.form.isshow_close = true
								this.isshowstop = true
							} else {
								uni.showToast({
									title: resons.msg,
									icon: 'none'
								})
								this.open_map()
								this.form.isshow_close = true
								this.isshowstop = true
							}
						})
						this.form.fild_list = []
						this.form.gpsCoordinateFileEntities = this.form.gpsCoordinateFileEntities.map(res => {
							res.url = res.url.replace("//", "/")
							res.url = res.url.replace("opt/", "")
							res.url = "http://115.236.28.75:8088/" + res.url
							this.form.fild_list.push(res.fileId)
							return res.url
						})
						this.open_map()
						this.form.isshow_close = true
						this.isshowstop = true
					}
				})
			},
			// 查询杆塔列表
			getCollectList(e) {
				let data = {
					linenameId: Number(this.form.linenameId) || this.line_id,
					regionalId: e || ''
				}
				if (data.regionalId == "" || data.regionalId == null) {
					delete data.regionalId
				}
				return new Promise((res, rej) => {
					util.myrequest(
						api.apis.getCollectList,
						data,
						"GET"
					).then(reson => {
						res(reson)
					})
				})

			},
			// 查找表箱最新编号
			getBdxNum(e, ie, gt_id) {
				let data = {
					linenameId: this.form.linenameId,
					regionalId: this.form.regionalId,
					collectId: gt_id,
					goDownTheRoadNum: e || "",
					// 中间线路
					intermediateLine: ie
				}
				if (data.regionalId == null || data.regionalId == '') {
					delete data.regionalId
				}
				console.log(data)
				return new Promise((res, rej) => {
					util.myrequest(
						api.apis.getBdxNum,
						data,
						"GET"
					).then(reson => {
						res(reson)
					})
				})
			},
			// 我是箱变详情
			gpscoordinatexbinfo(id) {
				// console.log(api.apis.gpscoordinatexbinfo + id)
				util.myrequest(
					api.apis.gpscoordinatexbinfo + id, {

					},
					"GET"
				).then(res => {
					this.open_map()
					console.log(res)
					if (res.code == 0) {
						this.form = res.gpsCoordinateXb
						this.form.fild_list = []
						this.form.gpsCoordinateFileEntities = this.form.gpsCoordinateFileEntities.map(res => {
							res.url = res.url.replace("//", "/")
							res.url = res.url.replace("opt/", "")
							res.url = "http://115.236.28.75:8088/" + res.url
							this.form.fild_list.push(res.fileId)
							return res.url
						})
						// 判断支线
						if (this.form.regionalId != null && this.form.regionalId != "" && this.form.lineType == 1) {
							this.current1 = 0
							let zxlist = this.list.filter(res => {
								return res.id == this.form.regionalId
							})
							this.form.regionalName = zxlist[0].value || ""
							this.initValue = zxlist[0].value || ""
						} else {
							console.log("我没支线")
							this.current1 = 1
						}
						this.open_map()
						this.isshowstop = true
						this.form.isshow_close = true
					}

				})
			},
			// 我是点击事件
			clickdetil(e) {
				console.log("我进来了 点击")
				console.log('点信息', e)
				this.daohang = {
					latitude: e.latitude,
					lingename: e.lingename,
					longitude: e.longitude
				}
				// 我是红点信息
				if (e.type == 0) {
					// if (this.line_id == "" || this.line_id == undefined) {
						if(this.line=="全部"||this.line==""){
						uni.showToast({
							title: "请先选择线路",
							icon: "none"
						})
						return
					} else {

						this.open_map()
						this.issshow_choose_type = true
					}
					this.notcollectedForm = e
					return
				}
				if (e.pointType == 6) {
					this.gpscoordinatebxInfo(e.index)
					return
				}
				if (e.pointType == 5) {
					this.gpscoordinatedljInfo(e.index)
					return
				}
				// 我是箱变详情
				if (e.pointType == 3) {
					this.gpscoordinatexbinfo(e.index)
					console.log("我是箱变")
					return
				}
				// 我是配电室详情
				if (e.pointType == 2) {
					this.gpscoordinatepdsinfo(e.index)
					console.log("我是配电室")
					return
				}
				if (e.pointType == 1) {
					console.log("我进来了")
					this.gpscoordinatehwzinfo(e.index, e)
					return
				}
				if (e.pointType == 4) {
					// 我是塔杆信息
					util.myrequest(
						api.apis.gpscoordinatecollectInfo + e.index, {

						},
						"GET"
					).then(res => {
						console.log(res)
						this.linenamexj = ""
						let ress = res.gpsCoordinateCollect
						ress.mainLineArray.map((reson, index) => {
							this.memberList.map((res_, index) => {
								if (res_.id == reson) {
									this.tgline_name.push(res_.id)
									let images = []
									let obj = {
										id: res_.id,
										name: res_.linename,
										images: images
									}
									this.linearr.push(obj)
								}
							})
						})
						this.form = res.gpsCoordinateCollect
						this.getRegionalList().then(res => {
							// 判断是否有支线
							if (ress.regionalId != "" && ress.regionalId != null) {
								this.initValue = this.list.filter(res => {
									return res.id == ress.regionalId
								})[0].value
								// 我是将图片筛出
								this.current1 = 0
								this.open_map()
								this.isshowstop = true
							} else {
								this.getRegionalList().then(res => {
									if (this.list.length == []) {
										return
									} else {
										this.initValue = this.list[0].value
									}
								})
								this.current1 = 1
								this.initValue = ""
								this.open_map()
								this.isshowstop = true
							}
						})
						this.form.isshow_close = true
						if (this.form.sftgdy == 1) {
							if (Object.keys(res.gpsCoordinateCollect.mainLineMap)[0] == this.form.linenameId) {
								this.current = 0
								this.line_list = []
								this.linenamexj = ""
								this.form.images = []
								this.header.linename = this.form.linename
								this.header.num = this.form.num
								for (let key in this.form) {
									if (key.indexOf("ur") == 0 && this.form[key] != "" && this.form[key] != null) {
										this.form.images.push(this.form[key])
									}
								}
							}
						} else {

						}
						// 判断同杆线路 我是找出所有同杆的图片进行处理对应渲染
						if (res.gpsCoordinateCollect.mainLineMap != null && !res.gpsCoordinateCollect.mainLineStringArray && res
							.gpsCoordinateCollect.mainLineIds !== res.gpsCoordinateCollect.id) {
							this.current = 0
							let resmap = res.gpsCoordinateCollect.mainLineMap
							resmap = Object.keys(resmap).map(reson => {
								let getlinename = (id) => {
									let items = this.items.filter(ress => {
										return ress.id == reson && ress.id != res.gpsCoordinateCollect.linenameId
									})
									return items[0]
								}
								var items = getlinename(reson)
								let images_list = []
								for (let key in resmap[reson]) {
									if (key.indexOf("ur") == 0 && resmap[reson][key] != "") {
										images_list.push(resmap[reson][key])
									}
								}
								if (!items) {

								} else {
									items.images = images_list
									items.num = resmap[reson].num
									items.id_ = resmap[reson].id
								}
								// obj.images =  images_list
								return getlinename(reson) || ""
							})
							resmap = resmap.filter(res => {
								return res != ""
							})
							this.line_list = resmap
							this.line_list.forEach((res, index) => {
								this.linenamexj += res.linename + " "
							})

						} else {
							this.line_list = []
						}

						if (this.form.sftgdy == 0) {
							this.current = 1
						} else {
							this.current = 0
						}
						// 如果同杆map是空
						this.form.images = []
						for (let key in this.form) {
							if (key.indexOf("ur") == 0 && this.form[key] != "" && this.form[key] != null) {
								this.form.images.push(this.form[key])
							}
						}
						this.header.linename = this.form.linename
						this.header.num = this.form.num
					})
				}

			},
			isshows() {
				this.isshow = true
			},
			closedown() {
				if (this.choose_linenameId == true) {
					this.choose_linenameId = false
					this.isshow = false
					return
				}
				this.isshow = false
				const subNVue1 = uni.getSubNVueById('home_map')
				subNVue1.setStyle({
					"width": "100%",
					"background": "transparent",
					"height": "100%",
					"zindex": 2
				})
			},
			open_cover() {
				this.cover_type = !this.cover_type
			},
			close_stop() {
				this.isshowstop = false
				this.close_map()
			},

			goBdMap() {
				console.log('djs')
				// this.haveInstalledApp("bd");
				// uni.getLocation({
				// 	type: 'wgs84',
				// 	success:  (res)=> {
				//         console.log(888,res)
				// 		console.log('当前位置的经度：' + res.longitude);
				// 		console.log('当前位置的纬度：' + res.latitude);
				// 	}
				// });
				// this.toMapAPP(res.latitude,res.longitude);
				this.toMapAPP(this.daohang.latitude, this.daohang.longitude);

			},
			goGdMap() {
				this.haveInstalledApp("gd");
			},

			toMapAPP(latitude, longitude, name) {
				let url = "";
				if (plus.os.name == "Android") {
					//判断是安卓端
					plus.nativeUI.actionSheet({
							//选择菜单
							title: "选择地图应用",
							cancel: "取消",
							buttons: [{
									title: "百度地图",
								},
								{
									title: "高德地图",
								},
							],
						},
						function(e) {
							switch (e.index) {
								//下面是拼接url,不同系统以及不同地图都有不同的拼接字段
								case 1:
									url =
										`baidumap://map/direction?destination=${latitude},${longitude}&coord_type=bd09ll&mode=driving&src=andr.baidu.openAPIdemo`
									break;
								case 2:
									url = `amapuri://route/plan/?dlat=${latitude}&dlon=${longitude}&dev=0`;
									break;
								default:
									break;
							}
							if (url != "") {
								//   url = encodeURI(url);
								plus.runtime.openURL(url, function(e) {}) //调起手机APP应用
								plus.runtime.openURL(url, function(e) {
									plus.nativeUI.alert("本机未安装指定的地图应用");
								});
							}

						}
					);
				} else {
					// iOS上获取本机是否安装了百度高德地图，需要在manifest里配置
					// 在manifest.json文件app-plus->distribute->apple->urlschemewhitelist节点下添加
					//（如urlschemewhitelist:["iosamap","baidumap"]）
					plus.nativeUI.actionSheet({
							title: "选择地图应用",
							cancel: "取消",
							buttons: [
								// 	{
								// 	title: "腾讯地图"
								// },
								{
									title: "百度地图",
								},
								{
									title: "高德地图",
								},
							],
						},
						function(e) {
							switch (e.index) {
								// case 1:
								// 	url = `qqmap://map/geocoder?coord=${latitude},${longitude}&referer=xxx`;
								// 	break;
								case 1:
									url = `baidumap://map/geocoder?src=andr.baidu.openAPIdemo&address=${name}"`;
									break;
								case 2:
									url =
										`androidamap://arroundpoi?sourceApplication=softname&keywords=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
									break;
								default:
									break;
							}
							if (url != "") {
								url = encodeURI(url);
								plus.runtime.openURL(url, function(e) {
									plus.nativeUI.alert("本机未安装指定的地图应用");
								});
							}
						}
					);
				}

			},


			haveInstalledApp(type) {
				let ua = window.navigator.userAgent,
					app = window.navigator.appVersion;
				uni.getLocation({
					type: 'wgs84',
					success: (res) => {
						console.log('当前位置的经度：' + res.longitude);
						console.log('当前位置的纬度：' + res.latitude);
					}
				});
				if (uni.getSystemInfoSync().platform == 'ios') {
					// ios端 
					console.log('ios端');
					let that = this;
					let originName = "我的当前位置";
					let origin = [];
					console.log(this.site);
					//   console.log(this.site.position[1]);
					//   console.log(this.site.position[0]);
					if (this.site.position.length > 0) {
						origin = [this.site.position[1], this.site.position[0]];
					} else {
						// [lng, lat]
						origin = ["30.042735", "121.160585"];
					}
					let destinationName = this.address;
					// let myGeo = new BMap.Geocoder();
					if (this.mySite.position[0]) {
						//[lng, lat]
						let destination = [that.mySite.position[1], that.mySite.position[0]];
						let uri = "";
						let mapPackage = "";

						uri =
							"baidumap://map/direction?origin=name:" +
							originName +
							"|latlng:" +
							origin[0] +
							"," +
							origin[1] +
							"&destination=name:" +
							destinationName +
							"|latlng:" +
							destination[0] +
							"," +
							destination[1] +
							"&mode=driving";
						mapPackage = "com.baidu.BaiduMap";
						window.location.href = uri

					} else {
						this.failMap(type)
						// this.$mint.Toast("无法获取作业地点的经纬度信息");
					}
					// 例子9999999
					//  window.location.href = "baidumap://map/direction?origin=name:天安门|latlng:34.264642646862,108.95108518068&destination=name:天安门2|latlng:40.007623,116.360582&mode=driving&src=yourCompanyName|yourAppName"

				} else if (uni.getSystemInfoSync().platform == 'android') {
					// android端 
					console.log('android端');
					let that = this;
					let mapPackage = "";
					if (type === "bd") {
						mapPackage = "com.baidu.BaiduMap";
					} else if (type === "gd") {
						mapPackage = "com.autonavi.minimap";
					}
					appAvailability.check(
						mapPackage,
						function() {
							that.succMap(type);
						},
						function() {
							that.failMap(type);
						}
					);
				}

				// window.location.href = "baidumap://map/direction?origin=" + geoCoordinates + "&destination=" + Destination + "&mode=driving&src=webapp.navi.yourCompanyName.yourAppName"
				// window.location.href = "baidumap://map/direction?origin=中关村&destination=五道口&mode=driving&region=北京&src=ios.baidu.openAPIdemo"
				// window.location.href = "baidumap://map/direction?origin=name:天安门|latlng:34.264642646862,108.95108518068&destination=name:天安门2|latlng:40.007623,116.360582&mode=driving&src=yourCompanyName|yourAppName"
				// 例子

				// 

			},
			succMap(type) {
				let that = this;
				let originName = "我的当前位置";
				let origin = [];
				//   console.log(this.site);
				//   console.log(this.site.position[1]);
				//   console.log(this.site.position[0]);
				if (this.site.position.length > 0) {
					origin = [this.site.position[1], this.site.position[0]];
				} else {
					// [lng, lat]
					origin = ["30.042735", "121.160585"];
				}
				let destinationName = this.address;
				// let myGeo = new BMap.Geocoder();
				// myGeo.getPoint(this.address, function(point){ this.pointLat
				if (this.mySite.position[0]) {
					//[lng, lat]
					let destination = [that.mySite.position[1], that.mySite.position[0]];
					let uri = "";
					let mapPackage = "";
					if (type === "bd") {
						uri =
							"baidumap://map/direction?origin=name:" +
							originName +
							"|latlng:" +
							origin[0] +
							"," +
							origin[1] +
							"&destination=name:" +
							destinationName +
							"|latlng:" +
							destination[0] +
							"," +
							destination[1] +
							"&mode=driving";
						mapPackage = "com.baidu.BaiduMap";
					} else if (type === "gd") {
						uri =
							"amapuri://route/plan/?slat=" +
							origin[0] +
							"&slon=" +
							origin[1] +
							"&sname=" +
							originName +
							"&dlat=" +
							destination[0] +
							"&dlon=" +
							destination[1] +
							"&dname=" +
							destinationName +
							"&dev=0&t=0";
						mapPackage = "com.autonavi.minimap";
					}

					let sApp = startApp.set({
						/* params */
						action: "ACTION_VIEW",
						category: "CATEGORY_DEFAULT",
						type: "text/css",
						package: mapPackage,
						uri: uri,
						flags: ["FLAG_ACTIVITY_CLEAR_TOP", "FLAG_ACTIVITY_CLEAR_TASK"],
						intentstart: "startActivity",
					});
					sApp.start(
						function() {
							// console.log("success");
						},
						function(error) {
							this.$mint.Toast(error);
						}
					);
				} else {
					this.$mint.Toast("无法获取作业地点的经纬度信息");
				}
				// }, "余姚市")
			},
			failMap(type) {
				let msg = "";
				if (type === "bd") {
					msg = "请先安装百度地图APP";
				} else if (type === "gd") {
					msg = "请先安装高德地图APP";
				}
				this.$mint.Toast(msg);
			},
			openMapByDefault(latitude, longitude, name) {


			},
			// 相位
			chengexiang(value){
			this.form.xiang=value.newVal
			}


		}
	}
</script>

<style lang="scss">
	.daobox {
		background: #0060fb;
		padding: 10rpx 20rpx;
		box-sizing: border-box;
		color: #FFFFFF;
		border-radius: 10rpx;
		text-align: center;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-right: 10rpx;
	}

	.daoicon {
		width: 30rpx;
		height: 30rpx;
		margin-right: 10rpx;
	}

	.godao {
		margin-right: 20rpx;
		white-space: nowrap;
	}

	.check_zxg {
		color: #333333 !important;
		border-color: blue !important;
	}

	.qcan {
		position: fixed;
		bottom: 0;
	}

	.blue {
		border-color: #357efe !important;
		color: #357efe !important
	}

	.blue_ {
		background: #357efe !important;
		color: #FFFFFF !important
	}

	.istg_dy_cont_top_item {
		width: 23%;
		height: 100%;
		line-height: 70rpx;
		border: 1rpx solid #adadad;
		text-align: center;

	}

	.istg_dy_cont_top_item_ {
		width: 50%;
		height: 100%;
		line-height: 70rpx;
		border: 1rpx solid #adadad;
		text-align: center;
	}

	.controls-title {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 185rpx;
		height: 80rpx;
		background-color: white;
		position: absolute;
		top: 200rpx;
		left: 40rpx;
		border-radius: 100rpx;
	}

	.zxg_radio_item {
		line-height: 60rpx;
		color: #888888;
		width: 140rpx;
		height: 60rpx;
		border: 1rpx solid #D9D9D9;
	}

	.map {
		width: 100vh;
		height: 100vh;

		.Notcollected {
			z-index: 999;
			width: 100%;
			height: 60vh;
			position: fixed;
			bottom: 0;
			background-color: white;

			.choose_type_item {
				width: 100%;
				height: 100rpx;
			}
		}

		.icon_detail {
			width: 100%;
			height: 60%;
			position: fixed;
			top: 40%;
			left: 50%;
			background-color: white;
			transform: translate(-50%, 0);

			// z-index:9999;
			.icon_detail_Header {
				width: 100%;
				height: 80rpx;
			}

			.constant {
				width: 100%;
				padding-left: 20rpx;
				padding-right: 20rpx;
				height: auto;

				.constant_item {
					height: auto;
					width: 100%;

					.constant_item_type {
						width: 100%;
					}
				}
			}
		}
	}


	.bottom_ {
		width: 100%;
		height: 80rpx;
		position: absolute;
		// bottom: ;
		// top:300rpx;
		bottom: 0;
		left: 0;
		background-color: white;
	}

	.long {
		width: 185rpx;
		height: 80rpx;
		background-color: white;
		position: absolute;
		top: 240rpx;
		left: 40rpx;
		border-radius: 100rpx;
	}

	.scale_ {
		width: 110rpx;
		height: 250rpx;
		position: absolute;
		bottom: 20rpx;
		right: 0;
	}

	.search {
		width: 100%;
		height: 90rpx;
		z-index: 99;
		position: absolute;
		top: 80rpx;

		.search_con {
			width: 100%;
			height: 100%;
			border-radius: 50rpx;
			background-color: #FFFFFF;

			.search_con_left {
				width: 80%;
			}

			.search_con_right {
				width: 150rpx;
				height: 90rpx;
				border-radius: 50rpx;
				background-color: #357efe;
			}
		}

	}

	.scroll-Y {
		height: 100%;
	}

	.scroll-Y_ {
		height: 53vh;
	}

	.search_down_con {
		z-index: 98;
		width: 100%;
		height: 50%;
		position: fixed;
		bottom: 0rpx;

		.search_down_con_ {
			overflow: hidden;
			width: 100%;
			height: 100%;
			background-color: #FFFFFF;

			.search_ {
				padding: 20rpx;
			}

			.MainlineName {
				width: 100%;
				height: 63%;

				.itemDom {
					width: 100%;
					height: 80rpx;
				}
			}

			.search_down_con_close {
				width: 100%;
				height: 80rpx;
				position: absolute;
				bottom: 0;
			}
		}

	}
</style>